Skip to content

Commit ff8b902

Browse files
committed
fix: checkout should use the same token as semantic release
1 parent 45e08ee commit ff8b902

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

.github/workflows/semantic-release.yaml

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,18 @@ jobs:
2828
USE_GH_APP: ${{ inputs.GH_APP_ID && secrets.GH_APP_PEM_FILE }}
2929

3030
steps:
31+
- name: Create GitHub App token
32+
uses: actions/create-github-app-token@v2
33+
id: gh-app-token
34+
if: env.USE_GH_APP
35+
with:
36+
app-id: ${{ inputs.GH_APP_ID }}
37+
private-key: ${{ secrets.GH_APP_PEM_FILE }}
38+
3139
- name: Checkout repository
3240
uses: actions/checkout@v4
3341
with:
42+
token: ${{ steps.gh-app-token.outputs.token || secrets.GH_TOKEN || secrets.GITHUB_TOKEN }}
3443
fetch-depth: 0
3544

3645
- name: Setup Node.js
@@ -51,14 +60,6 @@ jobs:
5160
- name: Verify the integrity of provenance attestations and registry signatures for installed dependencies
5261
run: npm audit signatures
5362

54-
- name: Create GitHub App token
55-
uses: actions/create-github-app-token@v2
56-
id: gh-app-token
57-
if: env.USE_GH_APP
58-
with:
59-
app-id: ${{ inputs.GH_APP_ID }}
60-
private-key: ${{ secrets.GH_APP_PEM_FILE }}
61-
6263
- name: Run Semantic Release
6364
env:
6465
GITHUB_TOKEN: ${{ steps.gh-app-token.outputs.token || secrets.GH_TOKEN || secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)