[llvm] workflows/release-tasks: Use app generated token for creating te release (PR #195219)

Tom Stellard via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 30 22:52:20 PDT 2026


https://github.com/tstellar updated https://github.com/llvm/llvm-project/pull/195219

>From e3198a3214ac27782913aadfbd130c51ed43bac3 Mon Sep 17 00:00:00 2001
From: Tom Stellard <tstellar at redhat.com>
Date: Thu, 30 Apr 2026 22:36:40 -0700
Subject: [PATCH 1/2] workflows/release-tasks: Use app generated token for
 creating the release

---
 .github/workflows/release-tasks.yml | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/.github/workflows/release-tasks.yml b/.github/workflows/release-tasks.yml
index 70cb4f639d0e6..ac3dbd93dd552 100644
--- a/.github/workflows/release-tasks.yml
+++ b/.github/workflows/release-tasks.yml
@@ -42,10 +42,18 @@ jobs:
         with:
           persist-credentials: false
 
+      - id: app-token
+        uses: actions/create-github-app-token at 1b10c78c7865c340bc4f6099eb2f838309f1e8c3  # v3.1.1
+        with:
+          app-id: ${{ inputs.LLVM_TOKEN_GENERATOR_CLIENT_ID }}
+          private-key: ${{ inputs.LLVM_TOKEN_GENERATOR_PRIVATE_KEY }}
+          owner: ${{ github.repository_owner }}
+          permission-members: read
+
       - name: Create Release
         env:
           GITHUB_TOKEN: ${{ github.token }}
-          USER_TOKEN: ${{ secrets.RELEASE_TASKS_USER_TOKEN }}
+          USER_TOKEN: ${{ steps.app-token.outputs.token }}
         run: |
           ./llvm/utils/release/./github-upload-release.py --token "$GITHUB_TOKEN" --release ${{ needs.validate-tag.outputs.release-version }} --user ${{ github.actor }} --user-token "$USER_TOKEN" create
   release-documentation:

>From a5a498554e9f3c37de562a2553d01f5563edf934 Mon Sep 17 00:00:00 2001
From: Tom Stellard <tstellar at redhat.com>
Date: Thu, 30 Apr 2026 22:51:55 -0700
Subject: [PATCH 2/2] Add environment

---
 .github/workflows/release-tasks.yml | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/.github/workflows/release-tasks.yml b/.github/workflows/release-tasks.yml
index ac3dbd93dd552..6fc252d989b3f 100644
--- a/.github/workflows/release-tasks.yml
+++ b/.github/workflows/release-tasks.yml
@@ -27,6 +27,9 @@ jobs:
   release-create:
     name: Create a New Release
     runs-on: ubuntu-24.04
+    environment:
+      name: release
+      deployment: false
     permissions:
       contents: write # For creating the release.
     needs: validate-tag



More information about the llvm-commits mailing list