Repository navigation
Release: stand down when main moved on with changed workflows - #79
Merged
Merged
Conversation
…lows GitHub refuses the workflow token a tag on a commit whose workflows differ from main's (HTTP 403, measured on v0.18.5's run, 49 s after a workflow change merged). The next run on main publishes that version, as it did. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LJbePcRzre7AusNzPNS2Bk
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.
v0.18.5's release run (#76) failed at Publish with
HTTP 403: Resource not accessible by integration. #78 changedrelease.ymland merged 49 s before that step. GitHub won't let the workflow token create a tag on a commit whose workflow files differ from main's; that needs aworkflowspermission the token can't be given. The--targetpinning from the code review (#11) makes this reachable. Nothing was lost: the next run, on #78's merge commit, published v0.18.5, and that commit contains #76.The fix: before
gh release create, fetch main. If main has moved on AND its workflows differ from the built commit's, the run stands down with a notice, and the next run publishes the version (runs queue one at a time, so it starts after this one). In every other case the tag still goes on the built commit.Verification: YAML parses. The diff test was checked on the real commits: 7b9e13d against d634dec means stand down (exit 1), and d634dec against main means publish (exit 0). Workflow change only, so no version bump.
🤖 Generated with Claude Code
https://claude.ai/code/session_01LJbePcRzre7AusNzPNS2Bk