fix(ci): stop semantic-release silently swallowing '!' commits; cap them at minor#71
Merged
Merged
Conversation
…hem at minor
The commit-analyzer was configured with the angular preset, whose header
parser does not accept the conventional-commits "!" marker —
feat!:/feat(scope)!: commits failed to parse and were analyzed as "no
release" (e.g. the 4 such commits since v4.0.0-rc.1 cut nothing).
Switch the analyzer to the conventionalcommits preset (already used by
release-notes-generator, dep already present) in all three release
configs, and add { breaking: true, release: 'minor' } so '!'/BREAKING
CHANGE commits cut at most a minor: major releases remain exclusively
under manual control via release(major) commits, per project policy.
Also fix the RC cleanup path:
- The "Clean Github Release for RC" step ran on no-release pushes
because contains('', '-') is false; gate it on new_release_published.
- clean-rc-releases.sh crashed on empty input (xargs ran
`gh release delete` with no args, exit 123) and relied on fragile
table output; use --json/--jq, xargs -r, and --yes for
non-interactive deletion. Tags are kept, as before.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
d83ff54 to
80fb692
Compare
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.
Why
Pushes of
feat!:/feat(scope)!:commits tomainwere not cutting a release — see run 27248868191, where all 4 such commits sincev4.0.0-rc.1(#68, #67, #64, #59) were analyzed as "no release".Root cause:
@semantic-release/commit-analyzerwas configured with the angular preset, whose header parser (/^(\w*)(?:\((.*)\))?: (.*)$/) does not accept the conventional-commits!marker. The header fails to parse, the commit type comes out empty, and no release rule matches — the commit is silently swallowed.What
Release configs (root,
packages/cli,packages/action):angulartoconventionalcommits— the same presetrelease-notes-generatoralready uses, andconventional-changelog-conventionalcommitsis already a root devDependency.{ breaking: true, release: 'minor' }:!/BREAKING CHANGE:commits now cut at most a minor. Major releases remain exclusively under manual control viarelease(major)commits (project policy) — the!marker can no longer bump a major, but it also can no longer silently produce no release.Verified against the real installed analyzer (
@semantic-release/commit-analyzer@13.0.1), 20 cases: the 4 commits above →minor;fix!/chore!/docs!/BREAKING CHANGE:footer →minor;release(major|minor|patch)→ major/minor/patch unchanged; plainfeat→minor,fix/perf/chore/refactor→patch,docs/ci/test→no release, all unchanged.After merge,
mainwill cut4.0.0-rc.2(prerelease increment on the existing rc line).RC cleanup (independent bug that made the linked run red):
Clean Github Release for RCstep ran on every no-release push becausecontains('', '-')isfalse; it is now also gated onnew_release_published == 'true'.scripts/clean-rc-releases.shcrashed on empty input (xargsinvokedgh release deletewith no args → exit 123) and parsed fragile table output. It now usesgh release list --json/--jq,xargs -r, and--yesfor non-interactive deletion. Git tags are kept, as before.🤖 Generated with Claude Code