File tree Expand file tree Collapse file tree 1 file changed +21
-1
lines changed Expand file tree Collapse file tree 1 file changed +21
-1
lines changed Original file line number Diff line number Diff line change @@ -277,19 +277,37 @@ jobs:
277
277
if : always()
278
278
279
279
build-publish :
280
+ permissions :
281
+ contents : write
282
+ issues : write
283
+ pull-requests : write
280
284
runs-on : ubuntu-latest
281
285
needs :
282
286
- lint
283
287
- test
284
288
- test-2_5
285
289
- test-rosetta
286
290
steps :
291
+ - name : Generate release bot app token
292
+ id : generate_token
293
+ uses : actions/create-github-app-token@v1
294
+ with :
295
+ app-id : ${{ secrets.HIROSYSTEMS_RELEASE_BOT_ID }}
296
+ private-key : ${{ secrets.HIROSYSTEMS_RELEASE_BOT_PEM }}
297
+
287
298
- uses : actions/checkout@v4
288
299
with :
289
300
token : ${{ secrets.GH_TOKEN || secrets.GITHUB_TOKEN }}
290
301
fetch-depth : 0
291
302
persist-credentials : false
292
303
304
+ - name : Get bot user ID
305
+ id : bot-user-id
306
+ run : |
307
+ echo "user-id=$(gh api "/users/${{ steps.generate_token.outputs.app-slug }}[bot]" --jq .id)" >> "$GITHUB_OUTPUT"
308
+ env :
309
+ GH_TOKEN : ${{ steps.generate_token.outputs.token }}
310
+
293
311
- uses : actions/setup-node@v4
294
312
with :
295
313
node-version-file : " .nvmrc"
@@ -300,9 +318,11 @@ jobs:
300
318
# Only run on non-PR events or only PRs that aren't from forks
301
319
if : github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository
302
320
env :
303
- GITHUB_TOKEN : ${{ secrets.GH_TOKEN || secrets.GITHUB_TOKEN }}
321
+ GITHUB_TOKEN : ${{ steps.generate_token.outputs.token }}
304
322
NPM_TOKEN : ${{ secrets.NPM_AUTH_TOKEN }}
305
323
SEMANTIC_RELEASE_PACKAGE : ${{ github.event.repository.name }}
324
+ GIT_AUTHOR_EMAIL : " ${{ steps.bot-user-id.outputs.user-id }}+${{ steps.generate_token.outputs.app-slug }}[bot]@users.noreply.github.com"
325
+ GIT_COMMITTER_EMAIL : " ${{ steps.bot-user-id.outputs.user-id }}+${{ steps.generate_token.outputs.app-slug }}[bot]@users.noreply.github.com"
306
326
with :
307
327
semantic_version : 19
308
328
extra_plugins : |
You can’t perform that action at this time.
0 commit comments