Skip to content

Commit 69c5356

Browse files
committed
ci: release with the built-in token instead of a PAT
DEPLOY_PAT existed only so @semantic-release/git could push the release commit past the two-stage ruleset. Bypassing that ruleset for the GitHub Actions app removes the need for any personal credential, matching turbo-sdk, which runs the same release on the plain GITHUB_TOKEN.
1 parent 2c72c10 commit 69c5356

1 file changed

Lines changed: 9 additions & 5 deletions

File tree

.github/workflows/release.yml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,14 @@ jobs:
2727
steps:
2828
- uses: actions/checkout@v4
2929
with:
30-
# A PAT (or GitHub App token) is required so the release commit/tag can
31-
# be pushed past the "changes must be made through a pull request"
32-
# branch ruleset. The token's actor must be in the ruleset bypass list.
33-
token: ${{ secrets.DEPLOY_PAT || github.token }}
30+
# @semantic-release/git pushes the `chore(release)` commit straight to
31+
# main, which the `two-stage` ruleset otherwise requires a PR for.
32+
# The GitHub Actions app (id 15368) is a bypass actor on that ruleset,
33+
# so the built-in token is sufficient — matching turbo-sdk, which runs
34+
# the same release with the plain GITHUB_TOKEN. No PAT to expire.
35+
# A push made with this token does not re-trigger workflows, and the
36+
# release commit carries [skip ci] regardless.
37+
token: ${{ github.token }}
3438
fetch-depth: 0
3539
fetch-tags: true
3640

@@ -61,7 +65,7 @@ jobs:
6165
# and becomes dead weight once it is.
6266
- name: Release
6367
env:
64-
GITHUB_TOKEN: ${{ secrets.DEPLOY_PAT || github.token }}
68+
GITHUB_TOKEN: ${{ github.token }}
6569
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
6670
HUSKY: '0'
6771
run: pnpm semantic-release

0 commit comments

Comments
 (0)