Skip to content

Commit 382baac

Browse files
committed
chore(ci): use TxnLab Release Bot for release workflow
Replace default GitHub Actions token with TxnLab Release Bot GitHub App for generating tokens. This enables the bot to bypass branch protection rules when creating release commits and tags. Changes: - Add token generation step using actions/create-github-app-token@v2 - Pass generated token to checkout action - Use generated token as GITHUB_TOKEN for semantic-release - Update git author/committer to TxnLab Release Bot identity
1 parent ec4bde4 commit 382baac

1 file changed

Lines changed: 14 additions & 6 deletions

File tree

.github/workflows/release.yml

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,19 @@ jobs:
1717
runs-on: ubuntu-latest
1818

1919
steps:
20+
- name: Generate release token
21+
id: generate_token
22+
uses: actions/create-github-app-token@v2
23+
with:
24+
app-id: ${{ vars.RELEASE_BOT_APP_ID }}
25+
private-key: ${{ secrets.RELEASE_BOT_PRIVATE_KEY }}
26+
2027
- name: Checkout
21-
uses: actions/checkout@v5
28+
uses: actions/checkout@v4
2229
with:
2330
fetch-depth: 0
2431
persist-credentials: false
32+
token: ${{ steps.generate_token.outputs.token }}
2533

2634
- name: Setup pnpm
2735
uses: pnpm/action-setup@v4
@@ -47,9 +55,9 @@ jobs:
4755

4856
- name: Release
4957
env:
50-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
51-
GIT_AUTHOR_NAME: github-actions[bot]
52-
GIT_AUTHOR_EMAIL: github-actions[bot]@users.noreply.github.com
53-
GIT_COMMITTER_NAME: github-actions[bot]
54-
GIT_COMMITTER_EMAIL: github-actions[bot]@users.noreply.github.com
58+
GITHUB_TOKEN: ${{ steps.generate_token.outputs.token }}
59+
GIT_AUTHOR_NAME: TxnLab Release Bot[bot]
60+
GIT_AUTHOR_EMAIL: txnlab-release-bot[bot]@users.noreply.github.com
61+
GIT_COMMITTER_NAME: TxnLab Release Bot[bot]
62+
GIT_COMMITTER_EMAIL: txnlab-release-bot[bot]@users.noreply.github.com
5563
run: npx semantic-release

0 commit comments

Comments
 (0)