release: fix release-branch base by saving release-commit digest early#1655
Merged
Conversation
fdc245f to
8f361c6
Compare
8f361c6 to
ed33d2e
Compare
refs/capture-commit is overwritten when the release action calls version with commit-to-head for the bump-commit. Read the digest into a step output before the release action runs, and use it in the reset step.
ed33d2e to
0fd62cd
Compare
TuanAnh17N
approved these changes
Jul 2, 2026
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: TuanAnh17N The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
LGTM label has been added. DetailsGit tree hash: 814a93e5a6b459067308003cb719430abb4438d3 |
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
When releasing with
create-release-branch: trueandnext-version: bump-minor, thereleaseaction calls the
versionaction twice in the same job — once withrepository-operation: capture-commit(release commit) and once withcommit-to-head(bump commit). The second callunconditionally overwrites
refs/capture-commitwith the bump commit's SHA (e.g.1.51.0-dev).The subsequent
reset-repository-to-release-commitstep then resets to that wrong base, so therelease-branch bump-patch commit lands on top of
1.51.0-dev→1.51.1-devinstead of theintended
1.50.0→1.50.1-dev.Fix: read
refs/capture-commitinto a step output before calling thereleaseaction, and usethat saved digest in the reset step instead of re-reading the (by then clobbered) ref.
Test plan
bump-minorrelease withcreate-release-branch: trueand verify the releasebranch is based on the release commit (e.g.
1.50.0→1.50.1-dev), not the bump commit.