fix: dispatch the Release pipeline on the tag ref#145
Merged
Conversation
gh workflow run without --ref attaches the workflow_dispatch run to the default branch, so Release runs showed up attributed to main instead of the tag (the workflow still checked out and validated the tag — build inputs were correct). Passing --ref <tag> restores the old push-tag attribution and makes the OIDC claims behind npm trusted publishing/provenance reference the tag. Change-Id: Iacd8b3522f8a72ce903854425744d6815e179be3 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Signed-off-by: Thomas Kosiewski <tk@coder.com>
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.
Summary
Spotted on the first real release (v0.4.2): the Release run dispatched by the release-please workflow was attributed to
main, not the tag (https://github.com/coder/agent-tty/actions/runs/27415069958).gh workflow runwithout--refattaches theworkflow_dispatchevent to the default branch.No artifact-integrity impact: release.yml resolves the tag from its input, checks out the tag explicitly, and validates tag↔package.json and main-ancestry before building — the v0.4.2 run built the right commit. This fix is about attribution and claims: with
--ref "$tag"the run attaches torefs/tags/v<version>like the oldpush: tagsflow, the Actions UI shows the tag, and the OIDC token claims behind npm trusted publishing/provenance reference the tag rather than main's current head.The workflow file version executed at the tag ref is the tag's own copy of release.yml, which always exists since release tags point at merge commits on main.
🤖 Generated with Claude Code