Skip to content

Commit b798b37

Browse files
authored
ci: generate app token for release workflows (#1248)
1 parent f90aa39 commit b798b37

2 files changed

Lines changed: 14 additions & 2 deletions

File tree

.github/workflows/release-publish.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,12 @@ jobs:
1111
publish-packages:
1212
runs-on: ubuntu-latest
1313
steps:
14+
- name: Generate token
15+
id: app-token
16+
uses: actions/create-github-app-token@v2
17+
with:
18+
app-id: ${{ secrets.APP_ID }}
19+
private-key: ${{ secrets.PRIVATE_KEY }}
1420
- name: Checkout
1521
uses: actions/checkout@v4
1622

@@ -39,4 +45,4 @@ jobs:
3945
draft: false
4046
prerelease: false
4147
env:
42-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
48+
GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}

.github/workflows/release-tag.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,12 @@ jobs:
1414
if: ${{ contains(github.event.head_commit.message, 'chore(release):') }}
1515
runs-on: ubuntu-latest
1616
steps:
17+
- name: Generate token
18+
id: app-token
19+
uses: actions/create-github-app-token@v2
20+
with:
21+
app-id: ${{ secrets.APP_ID }}
22+
private-key: ${{ secrets.PRIVATE_KEY }}
1723
- name: Checkout
1824
uses: actions/checkout@v4
1925
with:
@@ -31,4 +37,4 @@ jobs:
3137
gh workflow run release-publish.yml \
3238
--ref \$MELOS_PACKAGE_NAME-v\$MELOS_PACKAGE_VERSION
3339
env:
34-
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
40+
GH_TOKEN: ${{ steps.app-token.outputs.token }}

0 commit comments

Comments
 (0)