forked from llvm/llvm-project
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
workflows: Add GitHub action for automating some release tasks
For each release tag, this action will create a new release on GitHub, and for each -final tag, this action will build the documentation and upload it to GitHub. Reviewed By: hans Differential Revision: https://reviews.llvm.org/D99780
- Loading branch information
Showing
2 changed files
with
85 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
name: Release Task | ||
|
||
on: | ||
push: | ||
tags: | ||
# The regex support here is limited, so just match everything that starts with llvmorg- and filter later. | ||
- 'llvmorg-*' | ||
|
||
jobs: | ||
release-tasks: | ||
runs-on: ubuntu-latest | ||
steps: | ||
|
||
- name: Install Dependencies | ||
run: | | ||
sudo apt-get install doxygen python3-sphinx python3-recommonmark ninja-build graphviz texlive-font-utils python3-github | ||
pip3 install --user sphinx-markdown-tables | ||
- name: Checkout LLVM | ||
uses: actions/checkout@v1 | ||
with: | ||
fetch-depth: 1 | ||
|
||
# This step will only succeed if the tag name is valid, so it safe to | ||
# assume a valid tag name in all steps after this one. | ||
- name: Create Release | ||
run: | | ||
./llvm/utils/release/./github-upload-release.py --token ${{ github.token }} --tag ${{ github.ref_name }} create | ||
- name: Get Release Name | ||
id: release | ||
run: | | ||
name=`echo "${{ github.ref_name }}" | sed 's/llvmorg-//g'` | ||
echo "::set-output name=name::$name" | ||
- name: Build Documentation | ||
env: | ||
RELEASE: "${{ steps.release.output.name }}" | ||
run: | | ||
bash llvm/utils/release/build-docs.sh -srcdir llvm -release $RELEASE | ||
./llvm/utils/release/./github-upload-release.py --token ${{ github.token }} --release $RELEASE upload --files *doxygen*.tar.xz | ||
- name: Clone www-releases | ||
if: ${{ !contains(steps.release.outputs.name, 'rc') }} | ||
uses: actions/checkout@v1 | ||
with: | ||
repository: ${{ github.repository_owner }}/www-releases | ||
ref: main | ||
fetch-depth: 0 | ||
path: www-releases | ||
|
||
- name: Upload Release Notes | ||
env: | ||
RELEASE: "${{ steps.release.output.name }}" | ||
run: | | ||
./github-automation.py --token ${{ github.token }} setup-llvmbot-git | ||
mkdir -p ../www-releases/$RELEASE | ||
mv ./docs-build/html-export/* ../www-releases/$RELEASE | ||
cd ../www-releases | ||
git add $RELEASE | ||
git commit -a -m "Add $RELEASE documentation" | ||
git push https://${{ secrets.WWW_RELEASES_TOKEN }}@github.com/${{ github.repository_owner }}/www-releases main:main |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters