[PATCH] D99780: workflows: Add GitHub action for automating some release tasks
Tom Stellard via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 1 17:30:48 PDT 2021
tstellar created this revision.
tstellar added reviewers: hans, sqlbyme, asl.
tstellar requested review of this revision.
Herald added a project: LLVM.
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.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D99780
Files:
.github/workflows/release-tasks.yml
Index: .github/workflows/release-tasks.yml
===================================================================
--- /dev/null
+++ .github/workflows/release-tasks.yml
@@ -0,0 +1,60 @@
+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: Validate Tag
+ id: validate-tag
+ run: |
+ test "${{ github.actor }}" = "tstellar"
+ echo "${{ github.ref }}" | grep -e 'llvmorg-[0-9.]\+\(-rc[0-9]\+\)\?'$
+ release_version=`echo "${{ github.ref }}" | sed 's/refs\/tags\/llvmorg-//g'`
+ echo "::set-output name=release-version::$release_version"
+
+ - 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 at v1
+ with:
+ fetch-depth: 1
+
+ - name: Create Release
+ run: |
+ ./llvm/utils/release/./github-upload-release.py --token ${{ github.token }} --release ${{ steps.validate-tag.outputs.release-version }} create
+
+ - name: Build Documentation
+ run: |
+ bash llvm/utils/release/build-docs.sh -srcdir llvm -release ${{ steps.validate-tag.outputs.release-version }}
+ ./llvm/utils/release/./github-upload-release.py --token ${{ github.token }} --release ${{ steps.validate-tag.outputs.release-version }} upload --files *doxygen*.tar.xz
+
+ - name: Clone www-releases
+ if: ${{ !contains(steps.validate-tag.outputs.release-version, 'rc') }}
+ uses: actions/checkout at v1
+ with:
+ repository: ${{ github.repository_owner }}/www-releases
+ ref: main
+ fetch-depth: 0
+ path: www-releases
+
+ - name: Upload Release Notes
+ if: ${{ !contains(steps.validate-tag.outputs.release-version, 'rc') }}
+ run: |
+ mkdir -p ../www-releases/${{ steps.validate-tag.outputs.release-version }}
+ mv ./docs-build/html-export/* ../www-releases/${{ steps.validate-tag.outputs.release-version }}
+ cd ../www-releases
+ git add ${{ steps.validate-tag.outputs.release-version }}
+ git config user.email "llvmbot at llvm.org"
+ git config user.name "llvmbot"
+ git commit -a -m "Add ${{ steps.validate-tag.outputs.release-version }} documentation"
+ git push https://${{ secrets.WWW_RELEASES_TOKEN }}@github.com/${{ github.repository_owner }}/www-releases main:main
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D99780.334870.patch
Type: text/x-patch
Size: 2674 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210402/32a0e0c9/attachment.bin>
More information about the llvm-commits
mailing list