Can Major version changes (aka Breaking Changes) be handled in semantic-release using the exclamation mark?
git commit -m 'feat!: this is breaking, but is not recognized by semantic-release'
Conventional Commit guidelines show that breaking changes can be labeled in the footer in using an exclamation mark in the header.

This is the workflow that I have been testing
git init
git remote add origin [email protected]:klueless-io/k_genesis.git
git branch -M main
git add .
git commit -am 'first commit'
# Artificial starting version number
git tag v0.0.18 -a -m 'k_genesis initialize repository'
git push -u origin main --tags
git hist

rm a1
git add .
git commit -m 'feat: remove a1'
git hist

npx semantic-release --no-ci

git hist

This does not work as expected
rm a2
git add .
git commit -m 'feat: removed a2
BREAKING CHANGE: break dancing
'
git hist

npx semantic-release --no-ci


rm a3
git add .
git commit -m 'feat!: removed a3 with exclamation in header'

npx semantic-release --no-ci
# Analysis of 1 commits complete: no release

git hist

touch xmen
git add .
git commit -m 'feat: normal feat'
npx semantic-release --no-ci
git hist

I have used the default preset for "@semantic-release/commit-analyzer" (angular) and I have tried a custom preset (conventionalcommits)
my .releaserc
{
"branches": [
"main"
],
"plugins": [
"@semantic-release/commit-analyzer", {
"preset": "conventionalcommits"
}
]
}
When I looked at the source code conventional-changelog-conventionalcommits it seamed like breaking change in header should be supported.

You need to manually configure it in .releaserc:
YAML
branches:
- main
plugins:
- - "@semantic-release/commit-analyzer"
- preset: conventionalcommits
releaseRules:
- type: '*!'
release: major
JSON
{
"branches": [
"main"
],
"plugins": [
[
"@semantic-release/commit-analyzer",
{
"preset": "conventionalcommits",
"releaseRules": [
{
"type": "*!",
"release": "major"
}
]
}
]
]
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With