Uh oh!
There was an error while loading. Please reload this page.
fix(upsert-release): target the triggering commit when creating a release - #53
Merged
Conversation
…ease gh release create without --target and without a prior checkout lets GitHub default the new tag to the repo's default branch HEAD, so a release/tag can end up pointing at the wrong commit whenever the triggering ref differs from the default branch (e.g. a beta branch).
Uh oh!
There was an error while loading. Please reload this page.
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 freeto 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
gh release createinupsert-release.ymlran without a prior checkout and without--target, so GitHub created the new tag pointing at whatever commit was HEAD of the repo's default branch at that moment, instead of the commit that actually triggered the calling workflow.lenra-io/app-reveel: five consecutive prerelease tags (v1.7.0-beta.60throughv1.7.0-beta.64), created for five differentbeta-branch commits, all ended up pointing at the same stale commit onmain— becausemainhadn't moved in that window.--target ${{ github.sha }}togh release create. In a reusable workflow invoked viauses:,github.sharesolves to the caller's triggering commit, so the tag now lands on the correct commit regardless of which branch called it.Test plan
app-reveel), verify the new tag's commit matches the workflow run's actual triggering commit.Generated by Claude Code