feat(release): make commit-to-release policy a consumer input - #12
Merged
Conversation
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.
Adds a
release-policyinput torelease-prepare.ymlandrelease.yml: a JSON list of semantic-releasereleaseRules(string and boolean matchers,release: false|major|minor|patch, at least one matcher per rule) thatrelease-plan.mjsvalidates via the newparseReleasePolicyand applies instead of the formerRELEASE_RULESmodule constant (nowDEFAULT_RELEASE_RULES, used when the input is empty). The effective policy is recorded asreleasePolicyin the plan JSON, so the uploaded prepare artifact carries the provenance of what classified the release.Why: release classification was global toolkit policy - a shared tag move changed every consumer at once, including in-flight histories. Package manager, assets, and build commands are already consumer inputs; commit-to-release policy now is too. Caller stubs should pin the policy explicitly in both the prepare and release stubs (template update lands with the validate PR in this stack).
Deliberately not digest-bound into the commit/PR marker: the policy only decides the version bump - notes and the release diff are policy-independent - so a prepare/release mismatch either produces the identical release or fails closed on the release stage's existing
--expected-versionrecompute. Binding a digest would bump the marker schema and break recovery of already-merged release PRs for no added enforcement.Fixes #7