Skip to content

Commit 2fd91fc

Browse files
authored
Merge pull request #22 from structured-world/fix/#21-semantic-release-app-token
fix(ci): use GitHub App token for semantic-release
2 parents 0abbf3b + c8a6e1a commit 2fd91fc

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

.github/workflows/ci-cd.yml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,11 +130,18 @@ jobs:
130130
new-release-version: ${{ steps.semantic.outputs.new-release-version }}
131131

132132
steps:
133+
- name: Generate release token
134+
uses: tibdex/github-app-token@v2
135+
id: app-token
136+
with:
137+
app_id: ${{ secrets.RELEASER_APP_ID }}
138+
private_key: ${{ secrets.RELEASER_APP_PRIVATE_KEY }}
139+
133140
- name: Checkout code
134141
uses: actions/checkout@v4
135142
with:
136143
fetch-depth: 0
137-
token: ${{ secrets.GITHUB_TOKEN }}
144+
token: ${{ steps.app-token.outputs.token }}
138145

139146
- name: Setup Node.js
140147
uses: actions/setup-node@v4
@@ -159,7 +166,7 @@ jobs:
159166
- name: Run semantic-release
160167
id: semantic
161168
env:
162-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
169+
GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}
163170
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
164171
run: |
165172
npx semantic-release

0 commit comments

Comments
 (0)