9 # The regex support here is limited, so just match everything that starts with llvmorg- and filter later.
15 contents: write # To upload assets to release.
16 runs-on: ubuntu-latest
17 if: github.repository == 'llvm/llvm-project'
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"
28 uses: actions/checkout@v4
30 - name: Install Dependencies
33 sudo apt-get install -y \
39 pip3 install --user -r ./llvm/docs/requirements.txt
41 - name: Create Release
43 ./llvm/utils/release/./github-upload-release.py --token ${{ github.token }} --release ${{ steps.validate-tag.outputs.release-version }} create
45 - name: Build Documentation
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
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
60 repository: ${{ github.repository_owner }}/www-releases
65 - name: Upload Release Notes
66 if: ${{ !contains(steps.validate-tag.outputs.release-version, 'rc') }}
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 }}
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
78 runs-on: ubuntu-latest
79 if: github.repository == 'llvm/llvm-project'
82 uses: actions/checkout@v4
85 uses: aminya/setup-cpp@v1
91 - name: Install dependencies
94 sudo apt-get install -y python3-setuptools python3-psutil
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
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
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
120 password: ${{ secrets.LLVM_LIT_PYPI_API_TOKEN }}
121 packages-dir: llvm/utils/lit/dist/