[TOSA] Update TOSA Custom Operator attribute names to align with the spec (#71116)
[llvm-project.git] / .github / workflows / release-tasks.yml
blob85b720e323d1b1de8ae9bf648b3e534714431be7
1 name: Release Task
3 permissions:
4   contents: read
6 on:
7   push:
8     tags:
9       # The regex support here is limited, so just match everything that starts with llvmorg- and filter later.
10       - 'llvmorg-*'
12 jobs:
13   release-tasks:
14     permissions:
15       contents: write # To upload assets to release.
16     runs-on: ubuntu-latest
17     if: github.repository == 'llvm/llvm-project'
18     steps:
19       - name: Validate Tag
20         id: validate-tag
21         run: |
22           test "${{ github.actor }}" = "tstellar" || test "${{ github.actor }}" = "tru"
23           echo "${{ github.ref_name }}" | grep -e '^llvmorg-[0-9]\+\.[0-9]\+\.[0-9]\+\(-rc[0-9]\+\)\?$'
24           release_version=$(echo "${{ github.ref_name }}" | sed 's/llvmorg-//g')
25           echo "release-version=$release_version" >> "$GITHUB_OUTPUT"
27       - name: Checkout LLVM
28         uses: actions/checkout@v4
30       - name: Install Dependencies
31         run: |
32           sudo apt-get update
33           sudo apt-get install -y \
34               doxygen \
35               graphviz \
36               python3-github \
37               ninja-build \
38               texlive-font-utils
39           pip3 install --user -r ./llvm/docs/requirements.txt
41       - name: Create Release
42         run: |
43           ./llvm/utils/release/./github-upload-release.py --token ${{ github.token }} --release ${{ steps.validate-tag.outputs.release-version }} create
45       - name: Build Documentation
46         run: |
47           ./llvm/utils/release/build-docs.sh -release ${{ steps.validate-tag.outputs.release-version }}
48           ./llvm/utils/release/github-upload-release.py --token ${{ github.token }} --release ${{ steps.validate-tag.outputs.release-version }} upload --files ./*doxygen*.tar.xz
50       - name: Create Release Notes Artifact
51         uses: actions/upload-artifact@v3
52         with:
53           name: release-notes
54           path: docs-build/html-export/
56       - name: Clone www-releases
57         if: ${{ !contains(steps.validate-tag.outputs.release-version, 'rc') }}
58         uses: actions/checkout@v4
59         with:
60           repository: ${{ github.repository_owner }}/www-releases
61           ref: main
62           fetch-depth: 0
63           path: www-releases
65       - name: Upload Release Notes
66         if: ${{ !contains(steps.validate-tag.outputs.release-version, 'rc') }}
67         run: |
68           mkdir -p ../www-releases/${{ steps.validate-tag.outputs.release-version }}
69           mv ./docs-build/html-export/* ../www-releases/${{ steps.validate-tag.outputs.release-version }}
70           cd ../www-releases
71           git add ${{ steps.validate-tag.outputs.release-version }}
72           git config user.email "llvmbot@llvm.org"
73           git config user.name "llvmbot"
74           git commit -a -m "Add ${{ steps.validate-tag.outputs.release-version }} documentation"
75           git push https://${{ secrets.WWW_RELEASES_TOKEN }}@github.com/${{ github.repository_owner }}/www-releases main:main
77   release-lit:
78     runs-on: ubuntu-latest
79     if: github.repository == 'llvm/llvm-project'
80     steps:
81       - name: Checkout LLVM
82         uses: actions/checkout@v4
84       - name: Setup Cpp
85         uses: aminya/setup-cpp@v1
86         with:
87           compiler: llvm-16.0.6
88           cmake: true
89           ninja: true
91       - name: Install dependencies
92         run: |
93           sudo apt-get update
94           sudo apt-get install -y python3-setuptools python3-psutil
96       - name: Test lit
97         run: |
98           mkdir build && cd build
99           export FILECHECK_OPTS='-dump-input-filter=all -vv -color'
100           cmake ../llvm -DCMAKE_BUILD_TYPE=Release -G Ninja
101           ninja -v -j $(nproc) check-lit
103       - name: Package lit
104         run: |
105           cd llvm/utils/lit
106           # Remove 'dev' suffix from lit version.
107           sed -i 's/ + "dev"//g' lit/__init__.py
108           python3 setup.py sdist
110       - name: Upload lit to test.pypi.org
111         uses: pypa/gh-action-pypi-publish@release/v1
112         with:
113           password: ${{ secrets.LLVM_LIT_TEST_PYPI_API_TOKEN }}
114           repository-url: https://test.pypi.org/legacy/
115           packages-dir: llvm/utils/lit/dist/
117       - name: Upload lit to pypi.org
118         uses: pypa/gh-action-pypi-publish@release/v1
119         with:
120           password: ${{ secrets.LLVM_LIT_PYPI_API_TOKEN }}
121           packages-dir: llvm/utils/lit/dist/