Skip to content

Commit 2e3c896

Browse files
authored
Use GitHub App Token for release workflow
1 parent 4424e01 commit 2e3c896

1 file changed

Lines changed: 9 additions & 2 deletions

File tree

.github/workflows/release.yml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,18 @@ jobs:
2626
publish:
2727
runs-on: ubuntu-latest
2828
steps:
29+
- name: Generate GitHub App Token
30+
id: app-token
31+
uses: actions/create-github-app-token@v1
32+
with:
33+
app-id: ${{ secrets.AUTOMATION_APP_ID }}
34+
private-key: ${{ secrets.AUTOMATION_APP_PRIVATE_KEY }}
35+
2936
- name: Checkout
3037
uses: actions/checkout@v6
3138
with:
3239
ref: ${{github.event.release.target_commitish}}
33-
token: ${{ secrets.RELEASE_PERSONAL_ACCESS_TOKEN }}
40+
token: ${{ steps.app-token.outputs.token }}
3441

3542
- name: Set up JDK
3643
uses: actions/setup-java@v5
@@ -60,6 +67,6 @@ jobs:
6067
if: ${{ success() }}
6168
uses: actions-js/push@master
6269
with:
63-
github_token: ${{ secrets.GITHUB_TOKEN }}
70+
github_token: ${{ steps.app-token.outputs.token }}
6471
message: 'Release ${{github.event.release.tag_name}}'
6572
branch: ${{ github.event.release.target_commitish }}

0 commit comments

Comments
 (0)