[clang-tools-extra] [llvm] [clang] workflows: Refactor release-tasks.yml (PR #69523)

Tobias Hieta via cfe-commits cfe-commits at lists.llvm.org
Mon Jan 15 23:25:39 PST 2024


================
@@ -10,112 +10,70 @@ on:
       - 'llvmorg-*'
 
 jobs:
-  release-tasks:
-    permissions:
-      contents: write # To upload assets to release.
+  validate-tag:
+    name: Validate Tag
     runs-on: ubuntu-latest
     if: github.repository == 'llvm/llvm-project'
+    outputs:
+      release-version: ${{ steps.validate-tag.outputs.release-version }}
     steps:
       - name: Validate Tag
         id: validate-tag
         run: |
-          test "${{ github.actor }}" = "tstellar" || test "${{ github.actor }}" = "tru"
           echo "${{ github.ref_name }}" | grep -e '^llvmorg-[0-9]\+\.[0-9]\+\.[0-9]\+\(-rc[0-9]\+\)\?$'
           release_version=$(echo "${{ github.ref_name }}" | sed 's/llvmorg-//g')
           echo "release-version=$release_version" >> "$GITHUB_OUTPUT"
 
-      - name: Checkout LLVM
-        uses: actions/checkout at v4
-
+  release-create:
+    name: Create a New Release
+    runs-on: ubuntu-latest
+    needs: validate-tag
+    steps:
       - name: Install Dependencies
         run: |
           sudo apt-get update
-          sudo apt-get install -y \
-              doxygen \
-              graphviz \
-              python3-github \
-              ninja-build \
-              texlive-font-utils
-          pip3 install --user -r ./llvm/docs/requirements.txt
-
-      - 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: |
-          ./llvm/utils/release/build-docs.sh -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: Create Release Notes Artifact
-        uses: actions/upload-artifact at v3
-        with:
-          name: release-notes
-          path: docs-build/html-export/
-
-      - name: Clone www-releases
-        if: ${{ !contains(steps.validate-tag.outputs.release-version, 'rc') }}
-        uses: actions/checkout at v4
-        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
+          sudo apt-get install python3-github
----------------
tru wrote:

Yeah I was thinking about that, actually in general in this file. Shouldn't we try to hashpin all the dependencies since we have started to do that in other workflows?

https://github.com/llvm/llvm-project/pull/69523


More information about the cfe-commits mailing list