Skip to content

Commit 1514595

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

1 file changed

Lines changed: 10 additions & 11 deletions

File tree

.github/workflows/semantic-release.yaml

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -14,22 +14,21 @@ jobs:
1414
runs-on: ubuntu-latest
1515
environment: dev
1616
steps:
17+
- name: Generate GitHub App token
18+
id: app-token
19+
uses: actions/create-github-app-token@v2
20+
with:
21+
app-id: ${{ secrets.RELEASE_APP_ID }}
22+
private-key: ${{ secrets.RELEASE_APP_PRIVATE_KEY }}
23+
1724
- name: Checkout
1825
uses: actions/checkout@v4
1926
with:
2027
fetch-depth: 0
28+
token: ${{ steps.app-token.outputs.token }}
29+
# Prevent checkout from persisting the GitHub App token in local git config
2130
persist-credentials: false
2231

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"
32-
3332
- name: Setup Node.js
3433
uses: actions/setup-node@v4
3534
with:
@@ -44,4 +43,4 @@ jobs:
4443
- name: Run Semantic Release
4544
run: npx semantic-release
4645
env:
47-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
46+
GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}

0 commit comments

Comments
 (0)