Skip to content

Commit 0dc1987

Browse files
committed
ci: use GitHub App for semantic release authentication
This enables the release bot to bypass branch protection rulesets by using a GitHub App token instead of the default GITHUB_TOKEN.
1 parent 469be2d commit 0dc1987

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

.github/workflows/release.yaml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,13 @@ jobs:
2727
uses: actions/checkout@v4
2828
with:
2929
fetch-depth: 0
30+
- name: Generate GitHub App token
31+
id: app-token
32+
if: ${{ secrets.ETHIACK_RELEASE_BOT_APP_ID != '' && secrets.ETHIACK_RELEASE_BOT_APP_PRIVATE_KEY != '' }}
33+
uses: actions/create-github-app-token@v1
34+
with:
35+
app-id: ${{ secrets.ETHIACK_RELEASE_BOT_APP_ID }}
36+
private-key: ${{ secrets.ETHIACK_RELEASE_BOT_APP_PRIVATE_KEY }}
3037
- name: Setup Node.js
3138
uses: actions/setup-node@v4
3239
with:
@@ -42,5 +49,5 @@ jobs:
4249
run: npm audit signatures
4350
- name: Release
4451
env:
45-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
52+
GITHUB_TOKEN: ${{ steps.app-token.outputs.token || secrets.GITHUB_TOKEN }}
4653
run: npx semantic-release

0 commit comments

Comments
 (0)