Skip to content

fix(upsert-release): target the triggering commit when creating a release - #53

Merged
taorepoara merged 1 commit into
mainfrom
fix/upsert-release-tag-target
Aug 24, 2026
Merged

fix(upsert-release): target the triggering commit when creating a release#53
taorepoara merged 1 commit into
mainfrom
fix/upsert-release-tag-target

Conversation

@taorepoara

Copy link
Copy Markdown
Member

Summary

  • gh release create in upsert-release.yml ran 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.
  • Observed in lenra-io/app-reveel: five consecutive prerelease tags (v1.7.0-beta.60 through v1.7.0-beta.64), created for five different beta-branch commits, all ended up pointing at the same stale commit on main — because main hadn't moved in that window.
  • The actual build/deploy steps still use the correct checked-out source for each run, so shipped artifacts were unaffected — this only broke the tag/release-to-commit traceability in GitHub.
  • Fix: pass --target ${{ github.sha }} to gh release create. In a reusable workflow invoked via uses:, github.sha resolves to the caller's triggering commit, so the tag now lands on the correct commit regardless of which branch called it.

Test plan

  • On the next release created through this workflow (e.g. from app-reveel), verify the new tag's commit matches the workflow run's actual triggering commit.

Generated by Claude Code

…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).
@taorepoara
taorepoara merged commit a17be83 into mainAug 24, 2026
1 check passed
@taorepoara
taorepoara deleted the fix/upsert-release-tag-target branch August 24, 2026 09:13
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@taorepoara@claude