feat: allow release-candidate versions in the release pipeline - #424
Merged
Conversation
A version can now carry a SemVer pre-release suffix, so 0.6.0-rc1 can be dispatched to release-build, tagged as v0.6.0-rc1, and published. release-build validated the version against three plain numbers, which rejected a candidate outright. It now validates against SemVer 2.0 with the optional pre-release suffix, minus build metadata: SemVer ignores metadata when it compares versions, so two releases differing only there would look like one version to a consumer. release-publish passes --prerelease to gh release create when the version carries a suffix, so the repository's "latest" release keeps pointing at the newest finished version and a candidate is never the default download. The release PR body says the same thing to whoever reviews it. Nothing else needed to change. The v* tag trigger, the six publish checks, the asset URL and the two-commit PR shape were already written in terms of the version string rather than its shape.
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.
Human Summary
Allows a suffix to be added to a release version and tag.
Summary
Release-candidate versions like 0.6.0-rc1 were rejected. release-build validated its version input against three plain numbers, so a candidate never got past the first job.
Two changes make one work:
Nothing else needed to change. The v* tag trigger, the six publish checks, the asset URL and the two-commit PR shape were already written in terms of the version string rather than its shape, so they took a candidate as-is.
A consumer reaches a candidate by pinning it:
Section 7 of docs/ai/design/release-process.md covers the ordering rules, what publishing does differently, and that pinning line. The revision log has a new entry (d).
Testing
This is workflow YAML, so it was verified locally rather than on a runner.
Not covered locally: the macOS build itself and the real gh calls. Those first run when a release is dispatched.
References