6 # The regex support here is limited, so just match everything that starts with llvmorg- and filter later.
11 runs-on: ubuntu-latest
12 if: github.repository == 'llvm/llvm-project'
18 test "${{ github.actor }}" = "tstellar" || test "${{ github.actor }}" = "tru"
19 echo "${{ github.ref_name }}" | grep -e '^llvmorg-[0-9]\+\.[0-9]\+\.[0-9]\+\(-rc[0-9]\+\)\?$'
20 release_version=`echo "${{ github.ref_name }}" | sed 's/llvmorg-//g'`
21 echo "::set-output name=release-version::$release_version"
23 - name: Install Dependencies
25 sudo apt-get install -y \
29 python3-recommonmark \
33 pip3 install --user sphinx-markdown-tables
36 uses: actions/checkout@v3
38 - name: Create Release
40 ./llvm/utils/release/./github-upload-release.py --token ${{ github.token }} --release ${{ steps.validate-tag.outputs.release-version }} create
42 - name: Build Documentation
44 ./llvm/utils/release/build-docs.sh -srcdir llvm
45 ./llvm/utils/release/github-upload-release.py --token ${{ github.token }} --release ${{ steps.validate-tag.outputs.release-version }} upload --files *doxygen*.tar.xz
47 - name: Clone www-releases
48 if: ${{ !contains(steps.validate-tag.outputs.release-version, 'rc') }}
49 uses: actions/checkout@v3
51 repository: ${{ github.repository_owner }}/www-releases
56 - name: Upload Release Notes
57 if: ${{ !contains(steps.validate-tag.outputs.release-version, 'rc') }}
59 mkdir -p ../www-releases/${{ steps.validate-tag.outputs.release-version }}
60 mv ./docs-build/html-export/* ../www-releases/${{ steps.validate-tag.outputs.release-version }}
62 git add ${{ steps.validate-tag.outputs.release-version }}
63 git config user.email "llvmbot@llvm.org"
64 git config user.name "llvmbot"
65 git commit -a -m "Add ${{ steps.validate-tag.outputs.release-version }} documentation"
66 git push https://${{ secrets.WWW_RELEASES_TOKEN }}@github.com/${{ github.repository_owner }}/www-releases main:main