From 68596c615b419ada9762339dad88c6cc2818051b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sumire=20=28=E8=8F=AB=29?= <151038614+sumire88@users.noreply.github.com> Date: Tue, 2 Apr 2024 18:37:27 +0800 Subject: [PATCH] ci(generate-changelogs.yml): generate auth token on the fly --- .github/workflows/generate-changelogs.yml | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/.github/workflows/generate-changelogs.yml b/.github/workflows/generate-changelogs.yml index 0e041b8b1..cabaa23d3 100644 --- a/.github/workflows/generate-changelogs.yml +++ b/.github/workflows/generate-changelogs.yml @@ -23,6 +23,14 @@ jobs: steps: - uses: actions/checkout@v4 + - name: Generate GitHub Auth Token + # https://github.com/tibdex/github-app-token + id: generate_token + uses: tibdex/github-app-token@v2 + with: + app_id: ${{ secrets.GH_APP_ID }} + private_key: ${{ secrets.GH_APP_PRIVATE_KEY }} + - name: Generate release changelogs uses: daeuniverse/changelogs-generator-action@main id: changelog @@ -30,7 +38,7 @@ jobs: # https://github.com/daeuniverse/changelogs-generator-action previousRelease: ${{ inputs.previous_release_tag }} futureRelease: ${{ inputs.future_release_tag }} - token: ${{ secrets.GH_TOKEN }} + token: ${{ steps.generate_token.outputs.token }} - name: Print outputs shell: bash @@ -41,7 +49,7 @@ jobs: if: ${{ inputs.dry_run == 'false' }} uses: dacbd/create-issue-action@main with: - token: ${{ secrets.GH_TOKEN }} + token: ${{ steps.generate_token.outputs.token }} title: '[Release Changelogs] ${{ inputs.future_release_tag }}' labels: automated-issue,release assignees: "sumire88,mzz2017,kunish,jschwinger233"