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
Setup repository ✓
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
Remove a single file and call it a new feature ✓
rm a1
git add .
git commit -m 'feat: remove a1'
git hist
npx semantic-release --no-ci
git hist
Now Breaking Change using Footer Message ✓
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
Looking Good So Far ✓
Now try a breaking change using ! exclamation mark ✗ :( :( :(
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
Attempted custom configurations
I have used the default preset for "@semantic-release/commit-analyzer" (angular) and I have tried a custom preset (conventionalcommits)
{
"branches": [
"main"
],
"plugins": [
"@semantic-release/commit-analyzer", {
"preset": "conventionalcommits"
}
]
}
Looking a the source code
When I looked at the source code conventional-changelog-conventionalcommits it seamed like breaking change in header should be supported.