Skip to content

Commit 85072d6

Browse files
authored
fix: generate token in release workflow (#5)
Signed-off-by: Cesar Berrospi Ramis <[email protected]>
1 parent 27b5482 commit 85072d6

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

.github/workflows/build.yaml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,17 @@ jobs:
4343
pull-requests: write # to be able to comment on released pull requests
4444
id-token: write # to enable use of OIDC for npm provenance
4545
steps:
46+
- name: Create GitHub token
47+
uses: actions/create-github-app-token@v1
48+
id: app-token
49+
with:
50+
app-id: ${{ vars.CI_APP_ID }}
51+
private-key: ${{ secrets.CI_PRIVATE_KEY }}
4652
- name: Checkout repository
4753
uses: actions/checkout@v4
4854
with:
55+
token: ${{ steps.app-token.outputs.token }}
56+
fetch-depth: 0 # for fetching tags, required for semantic-release
4957
persist-credentials: false
5058
- name: Setup Node.js
5159
uses: actions/setup-node@v4
@@ -63,5 +71,5 @@ jobs:
6371
run: npm audit signatures
6472
- name: Run semantic-release
6573
env:
66-
GH_TOKEN: ${{ secrets.GH_TOKEN }}
74+
GH_TOKEN: ${{ steps.app-token.outputs.token }}
6775
run: npm run semantic-release

0 commit comments

Comments
 (0)