Reputation: 3243
So i have this semantic releases, set up and working with conventionl commits for minor and patch versions.
But i want it to work for major versions, so that when i add "!" exclamation mark, a major version upgrade occurs. But it doesnt seem to be working, im not sure what i need to add to the config
{
"branches": [
"master"
],
"plugins": [
[
"@semantic-release/commit-analyzer",
{
"preset": "conventionalcommits",
"releaseRules": [
{
"type": "major",
"release": "major"
},
{
"type": "feat",
"release": "minor"
},
{
"type": "fix",
"release": "patch"
},
{
"type": "perf",
"release": "patch"
},
{
"type": "revert",
"release": "patch"
},
{
"type": "docs",
"release": "patch"
},
{
"type": "style",
"release": "patch"
},
{
"type": "chore",
"release": false
},
{
"type": "refactor",
"release": "patch"
},
{
"type": "test",
"release": false
},
{
"type": "build",
"release": false
},
{
"type": "ci",
"release": false
}
]
}
],
[
"@semantic-release/release-notes-generator",
{
"preset": "conventionalcommits",
"presetConfig": {
"types": [
{
"type": "major",
"section": "Features"
},
{
"type": "feat",
"section": "Features"
},
{
"type": "fix",
"section": "Bug Fixes"
},
{
"type": "perf",
"section": "Performance Improvements"
},
{
"type": "revert",
"section": "Reverts"
},
{
"type": "docs",
"section": "Documentation",
"hidden": true
},
{
"type": "style",
"section": "Styles",
"hidden": true
},
{
"type": "chore",
"section": "Miscellaneous Chores",
"hidden": true
},
{
"type": "refactor",
"section": "Code Refactoring"
},
{
"type": "test",
"section": "Tests",
"hidden": true
},
{
"type": "build",
"section": "Build System",
"hidden": true
},
{
"type": "ci",
"section": "Continuous Integration",
"hidden": true
}
]
}
}
],
"@semantic-release/changelog",
[
"@semantic-release/git",
{
"assets": [
"CHANGELOG.md"
],
"message": "chore(release): ${nextRelease.version} CHANGELOG.md [ci skip]"
}
],
[
"@semantic-release/gitlab",
{
"successComment": false
}
],
[
"@semantic-release/exec",
{
"prepareCmd": "echo ${nextRelease.version} > .next-version"
}
]
]
}
Upvotes: 0
Views: 619