ci: check before releasing, and make a minor a checkbox - #466
Merged
Conversation
The release job built and packed the tarball but ran neither the linters nor the tests, so the last thing standing between main and the registry checked less than a pull request does. That gap is reachable. The main ruleset does not require a pull request to be up to date with main before merging, so two branches that were each green on their own can break main together, and nothing would have caught it until someone installed the published version. Spelled out step by step rather than calling `pnpm check`, which starts by rewriting files with `pnpm fmt` instead of reporting on them.
Contributor
📝 WalkthroughWalkthroughThe release workflow now reruns pull request checks against ChangesRelease validation
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Anything that ships is now a patch, and a minor is asked for by ticking a box when starting the workflow. Whether a batch is significant enough to be a minor is a judgement about the release as a whole, made once by a person looking at all of it, rather than one each commit subject has to make correctly. Keeping it there is also what keeps the minor number meaning something. Switches the analyzer to the conventionalcommits preset so that "feat!:" parses at all. Under the angular preset its header pattern has no room for the "!", so the type failed to parse, no rule matched, and a breaking change released nothing at all — silently, which is the worst way for it to go wrong. The breaking rule is first in releaseRules and has to stay there. Without it the feat rule matches "feat!: …" too and a breaking change goes out as a patch. With it, both that and a BREAKING CHANGE: footer reach the guard and fail the run, which is where a major belongs: in a person's hands.
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.
Two changes to how a release is decided and gated.
Checks before releasing. The release job packed the tarball but ran neither
linters nor tests. The
mainruleset hasstrict_required_status_checks_policy: false, so two branches that were eachgreen in isolation can break
maintogether — reachable, not theoretical.A minor is now a checkbox. Everything that ships is a patch; a minor is
asked for when starting the workflow. Ladder: patch automatically, minor by
checkbox, major by hand and never from this workflow.
One thing worth a reviewer's attention: the
{ breaking: true, release: major }rule must stay first in
releaseRules. Without it thefeatrule matchesfeat!:too and a breaking change ships as a patch. The preset switch toconventionalcommitsis what makesfeat!:parse at all — underangularitmatched no rule and released nothing, silently.