Skip to content

Commit 5b28a92

Browse files
fix(release): stop the persisted GITHUB_TOKEN from hijacking the tag push
v1.6.0's stable tag triggered no run of tags.yaml, so generate-changelog and update-website-docs never ran for the release, while every rc tag pushed by cut-prerelease.yaml triggered normally. The finalize checkout ran with the default persist-credentials, which writes the built-in GITHUB_TOKEN into .git/config as an `http.https://github.com/.extraheader` Authorization header. That header is sent on every request to github.com and beats the app token the tag steps embed in the remote URL via `git remote set-url`, so the tag push authenticated as GITHUB_TOKEN — and GitHub suppresses workflow triggers for refs pushed with GITHUB_TOKEN. cut-prerelease.yaml differs only in supplying the app token to checkout itself, which is why its tags fired. Drop the persisted credential so the app token in the remote URL is the only one, matching the pattern promote-rc.yaml already documents. Nothing in the job needs it: every remote operation runs after its own `set-url`. Latent since 0697c02; v1.6.0 was the first release in which finalize actually created the tag. Assisted-By: Claude <[email protected]> Signed-off-by: Myasnikov Daniil <[email protected]>
1 parent d163a71 commit 5b28a92

1 file changed

Lines changed: 16 additions & 0 deletions

File tree

‎.github/workflows/pull-requests-release.yaml‎

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,10 +70,26 @@ jobs:
7070
console.log(`✅ Tag to publish: ${tag}`);
7171
7272
# Checkout repo & create / push annotated tag
73+
#
74+
# persist-credentials: false is load-bearing, not hygiene. With it left on
75+
# the default, checkout writes the built-in GITHUB_TOKEN into .git/config
76+
# as an `http.https://github.com/.extraheader` Authorization header, and
77+
# that header is sent on every request to github.com — beating the app
78+
# token the tag steps below embed in the remote URL via `git remote
79+
# set-url`. The tag push then authenticates as GITHUB_TOKEN, and GitHub
80+
# suppresses workflow triggers for refs pushed with GITHUB_TOKEN
81+
# (anti-recursion). That is why v1.6.0's stable tag fired no run of
82+
# tags.yaml — so `generate-changelog` and `update-website-docs` never ran
83+
# for the release — while every rc tag, pushed by cut-prerelease.yaml with
84+
# the app token supplied to checkout itself, triggered normally. Dropping
85+
# the persisted credential leaves the app token as the only one, matching
86+
# the pattern promote-rc.yaml already documents. Nothing here needs it:
87+
# every remote operation in this job runs after its own `set-url`.
7388
- name: Checkout repo
7489
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
7590
with:
7691
fetch-depth: 0
92+
persist-credentials: false
7793

7894
# Create the release tag at the merge commit — write-once.
7995
#

0 commit comments

Comments
 (0)