Skip to content

Commit b72d8a1

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

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

.github/workflows/ci.yaml

Lines changed: 13 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

@@ -78,8 +86,12 @@ jobs:
7886
with:
7987
inputs: "*.tgz"
8088

89+
- name: Debug auth
90+
run: |
91+
curl -s -H "Authorization: token ${{ steps.GENERATE_TOKEN.outputs.token }}" https://api.github.com/user
92+
8193
- name: Run Semantic Release
8294
env:
83-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
95+
GITHUB_TOKEN: ${{ steps.GENERATE_TOKEN.outputs.token }}
8496
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
8597
run: npx semantic-release

0 commit comments

Comments
 (0)