Skip to content

fix(ci): stop semantic-release silently swallowing '!' commits; cap them at minor#71

Merged
philz3906 merged 1 commit into
mainfrom
dev/philz3906/fix-release-config
Jun 10, 2026
Merged

fix(ci): stop semantic-release silently swallowing '!' commits; cap them at minor#71
philz3906 merged 1 commit into
mainfrom
dev/philz3906/fix-release-config

Conversation

@philz3906

@philz3906 philz3906 commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

Why

Pushes of feat!: / feat(scope)!: commits to main were not cutting a release — see run 27248868191, where all 4 such commits since v4.0.0-rc.1 (#68, #67, #64, #59) were analyzed as "no release".

Root cause: @semantic-release/commit-analyzer was 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):

  • Switch the commit-analyzer preset from angular to conventionalcommits — the same preset release-notes-generator already uses, and conventional-changelog-conventionalcommits is already a root devDependency.
  • Add { breaking: true, release: 'minor' }: ! / BREAKING CHANGE: commits now cut at most a minor. Major releases remain exclusively under manual control via release(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; plain feat→minor, fix/perf/chore/refactor→patch, docs/ci/test→no release, all unchanged.

After merge, main will cut 4.0.0-rc.2 (prerelease increment on the existing rc line).

RC cleanup (independent bug that made the linked run red):

  • The Clean Github Release for RC step ran on every no-release push because contains('', '-') is false; it is now also gated on new_release_published == 'true'.
  • scripts/clean-rc-releases.sh crashed on empty input (xargs invoked gh release delete with no args → exit 123) and parsed fragile table output. It now uses gh release list --json/--jq, xargs -r, and --yes for non-interactive deletion. Git tags are kept, as before.

🤖 Generated with Claude Code

…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>
@philz3906 philz3906 force-pushed the dev/philz3906/fix-release-config branch from d83ff54 to 80fb692 Compare June 10, 2026 18:24
@philz3906 philz3906 changed the title fix(ci): make semantic-release recognize breaking-change commits and fix rc cleanup fix(ci): stop semantic-release silently swallowing '!' commits; cap them at minor Jun 10, 2026
@philz3906 philz3906 merged commit 84ba988 into main Jun 10, 2026
1 check passed
@philz3906 philz3906 deleted the dev/philz3906/fix-release-config branch June 10, 2026 18:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant