Skip to content

Commit 1176f6c

Browse files
committed
ci(steps): Handle push into protected branch
1 parent 3df8aec commit 1176f6c

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

.github/workflows/ci.yaml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
name: CI Pipeline
2+
run-name: ${{ github.actor }} is automatically publishing
23

34
on:
45
push:
@@ -53,6 +54,13 @@ jobs:
5354
pull-requests: write
5455
runs-on: ubuntu-latest
5556
steps:
57+
- name: 'Generate token'
58+
id: GENERATE_TOKEN
59+
uses: actions/create-github-app-token@v2
60+
with:
61+
app-id: ${{ secrets.BOT_APP_ID }}
62+
private-key: ${{ secrets.BOT_PRIVATE_KEY }}
63+
5664
- name: Checkout
5765
uses: actions/checkout@v4
5866

@@ -80,6 +88,6 @@ jobs:
8088

8189
- name: Run Semantic Release
8290
env:
83-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
91+
GITHUB_TOKEN: ${{ steps.GENERATE_TOKEN.outputs.token }}
8492
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
8593
run: npx semantic-release

0 commit comments

Comments
 (0)