Skip to content

Commit 84033a0

Browse files
committed
feat(github): use scaf release bot to run semantic release
1 parent 8a6165a commit 84033a0

1 file changed

Lines changed: 10 additions & 12 deletions

File tree

.github/workflows/semantic-release.yaml

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ on:
44
push:
55
branches:
66
- main
7+
workflow_dispatch:
78

89
permissions:
910
contents: write
@@ -14,21 +15,18 @@ jobs:
1415
runs-on: ubuntu-latest
1516
environment: dev
1617
steps:
18+
- name: Generate GitHub App token
19+
id: app-token
20+
uses: actions/create-github-app-token@v1
21+
with:
22+
app-id: ${{ secrets.RELEASE_APP_ID }}
23+
private-key: ${{ secrets.RELEASE_APP_PRIVATE_KEY }}
24+
1725
- name: Checkout
1826
uses: actions/checkout@v4
1927
with:
2028
fetch-depth: 0
21-
persist-credentials: false
22-
23-
- name: Setup SSH
24-
uses: webfactory/ssh-agent@v0.8.0
25-
with:
26-
ssh-private-key: ${{ secrets.GA_DEPLOY_KEY }}
27-
28-
# use SSH url to ensure git commit using a deploy key bypasses the main
29-
# branch protection rule
30-
- name: Configure Git for SSH Push
31-
run: git remote set-url origin "git@github.com:${{ github.repository }}.git"
29+
token: ${{ steps.app-token.outputs.token }}
3230

3331
- name: Setup Node.js
3432
uses: actions/setup-node@v4
@@ -44,4 +42,4 @@ jobs:
4442
- name: Run Semantic Release
4543
run: npx semantic-release
4644
env:
47-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
45+
GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}

0 commit comments

Comments
 (0)