[IRBuilder] Refactor FMF interface (#121657)
[llvm-project.git] / .github / workflows / release-doxygen.yml
blobea95e5bb12b2b811fb72178aa0d74105d7760896
1 name: Release Doxygen
3 permissions:
4   contents: read
6 on:
7   workflow_dispatch:
8     inputs:
9       release-version:
10         description: 'Release Version'
11         required: true
12         type: string
13       upload:
14         description: 'Upload documentation'
15         required: false
16         type: boolean
18   workflow_call:
19     inputs:
20       release-version:
21         description: 'Release Version'
22         required: true
23         type: string
24       upload:
25         description: 'Upload documentation'
26         required: false
27         type: boolean
28     secrets:
29       RELEASE_TASKS_USER_TOKEN:
30         description: "Secret used to check user permissions."
31         required: false
33 jobs:
34   release-doxygen:
35     name: Build and Upload Release Doxygen
36     runs-on: ubuntu-latest
37     permissions:
38       contents: write
39     env:
40       upload: ${{ inputs.upload && !contains(inputs.release-version, 'rc') }}
41     steps:
42       - name: Checkout LLVM
43         uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
45       - name: Setup Python env
46         uses: actions/setup-python@v5
47         with:
48           cache: 'pip'
49           cache-dependency-path: './llvm/docs/requirements.txt'
51       - name: Install Dependencies
52         run: |
53           sudo apt-get update
54           sudo apt-get install -y \
55               doxygen \
56               graphviz \
57               python3-github \
58               ninja-build \
59               texlive-font-utils
60           pip3 install --user -r ./llvm/docs/requirements.txt
62       - name: Build Doxygen
63         run: |
64           ./llvm/utils/release/build-docs.sh -release "${{ inputs.release-version }}" -no-sphinx
66       - name: Upload Doxygen
67         if: env.upload
68         env:
69           GITHUB_TOKEN: ${{ github.token }}
70           USER_TOKEN: ${{ secrets.RELEASE_TASKS_USER_TOKEN }}
71         run: |
72           ./llvm/utils/release/github-upload-release.py --token "$GITHUB_TOKEN" --release "${{ inputs.release-version }}" --user "${{ github.actor }}" --user-token "$USER_TOKEN" upload --files ./*doxygen*.tar.xz