Repository navigation
fix: keep a tagged branch head's prerelease version - #14
Merged
Merged
Conversation
On feature and other non-main branches, GitHubFlow's defaults counted the next prerelease at a commit that already had its prerelease tag, so a rerun tagged and published the same commit again. The bundled config now keeps the tagged version there, as release branches already did, and a real-history test covers feature, unknown and pull-request branches.
This was referenced Nov 25, 2026
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.
Problem
On a non-main branch, GitHubFlow's defaults count the next prerelease at a commit that already carries its prerelease tag. A second CI run at the same commit therefore calculates a new version, the action finds no such tag, and it tags and publishes the same commit again.
Observed through
vhco-pro/version-workflowv0.1.2 on vhco-pro/ssm-connect PR #41. Run 45495839464 taggedv0.8.0-feat-shared-swift-core.2at6ec3c81, then a dispatch at the same commit (run 45506876260) taggedv0.8.0-feat-shared-swift-core.3there too.mainis not affected: withincrement: None, its tagged head computes the same stable version.Change
prevent-increment.when-current-commit-tagged: truefor thefeatureandunknownbranch types, as it already does forrelease. Thepull-requesttype already behaves this way.feat/x,feature/xandpull/7. For each, a tagged head must compute its tag again, and the next commit must take the next prerelease number.Checks
GITVERSION_BINARY=<verified 6.8.0> npm test: the new test failed first onfeat/xandfeature/x(1.2.4-feat-x.2, expected.1); all 36 tests pass with the fix.shellcheck scripts/*.shandactionlint .github/workflows/*.ymlpass.