ci(release): push release tag with KIT_RELEASE_TOKEN so the release pipeline fires#51
Merged
Merged
Conversation
…ipeline fires
The release job's actions/checkout step had no `token:`, so the subsequent
`git push origin "${TAG}"` in scripts/tag-release.sh authenticated with the
default GITHUB_TOKEN. GitHub does NOT fire workflow triggers for tags pushed
with GITHUB_TOKEN, so the downstream GoReleaser/Homebrew/notify pipeline
silently never ran on a real release — manual workflow_dispatch was the only
recovery.
Persist KIT_RELEASE_TOKEN (a PAT) on the checkout that precedes the tag push so
the tag push triggers the binary/Homebrew/notify pipeline.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
BCook98
marked this pull request as ready for review
June 17, 2026 02:20
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
In
.github/workflows/release.yml, thereleasejob'sactions/checkoutstep (was line ~16-17) had notoken::So the tag push in
scripts/tag-release.sh(~line 24,git push origin "${TAG}") authenticated with the defaultGITHUB_TOKENthat checkout persists.GitHub does NOT fire workflow triggers for tags pushed using
GITHUB_TOKEN. That means on a real release (when the "Version Packages" PR merges and the changesetspublishstep pushesvX.Y.Z), the downstream pipeline that the tag is supposed to trigger — GoReleaser binary build, theshellcade-kitHomebrew cask, and thekit-releasedconsumerrepository_dispatchnotify — silently never ran. The only recovery was a manualworkflow_dispatch.Fix
Persist
KIT_RELEASE_TOKEN(a PAT) on the checkout step that precedes the tag push, sogit push origin "${TAG}"uses the PAT and the tag push fires the downstream workflows:The
git pushinscripts/tag-release.shruns against theoriginremote configured by this same checkout step, so persisting the PAT here is what makes the tag push use it.Related note (not fixed here — kept this PR focused)
The
changesets/actionenv still uses a silent fallback:GITHUB_TOKEN: ${{ secrets.KIT_RELEASE_TOKEN || secrets.GITHUB_TOKEN }}(release.yml line ~32). With this PR, the checkouttoken:has no such fallback — ifKIT_RELEASE_TOKENis unset/expired, checkout fails loudly rather than half-publishing, which is the desired behavior for the trigger path. But the changesets-action fallback could still half-publish (open the Version Packages PR / version bump under the Actions token) on an expired PAT while the tag-trigger path is broken. Worth a follow-up to decide whether that fallback should also be made strict. Left out of this PR to keep the diff to the trigger fix.Verification
actionlint .github/workflows/release.yml→ passed (clean).ruby -ryaml) →YAML_OK.No Go/build changes; this is a workflow-only edit. The end-to-end trigger behavior can only be confirmed on a live release run, which I can't exercise here.
Reviewer focus
secrets.KIT_RELEASE_TOKENis populated in the repo/org and scoped withcontents:writeso the tag push succeeds.publishstep'sgit push origin "${TAG}"uses the credentials this checkout step stores.🤖 Generated with Claude Code