diff --git a/release.config.js b/release.config.js index f048a1e0b..6b281a4aa 100644 --- a/release.config.js +++ b/release.config.js @@ -5,7 +5,19 @@ module.exports = { "@semantic-release/commit-analyzer", { "preset": "conventionalcommits", + // The first rule caps commits with a BREAKING CHANGE footer or `!:` + // marker at `minor`. Without it, semantic-release's built-in default + // rule `{ breaking: true, release: 'major' }` kicks in and auto-ships + // a major release the moment any commit body contains the words + // "BREAKING CHANGE". That's almost never what we want on 0.x — one + // stray commit would jump us straight to 1.0.0. Run semantic-release + // with an explicit `--release major` override for genuine major bumps. + // + // User rules are evaluated before the defaults; defaults only apply + // when no user rule matches. So capturing `breaking: true` here + // prevents the default major rule from being consulted at all. "releaseRules": [ + { "breaking": true, "release": "minor" }, { "type": "feat", "release": "minor" }, { "type": "*", "release": "patch" }, ],