release it
https://www.npmjs.com/package/release-it
Instalar release-it, necesita commitlint
npm i --save-dev release-it @release-it/conventional-changelog
incluye script en package.json, ejemplo
"scripts": {
"release": "release-it"
},
archivo .release-it.json
{
"git": {
"commitMessage": "chore: release v${version}"
},
"github": {
"release": true
},
"npm": {
"publish": false
},
"plugins": {
"@release-it/conventional-changelog": {
"infile": "CHANGELOG.md",
"preset": {
"name": "conventionalcommits",
"types": [
{
"type": "feat",
"section": "Features"
},
{
"type": "fix",
"section": "Bug Fixes"
}
]
}
}
}
}
Alternativa
{
"git": {
"commitMessage": "chore: release v${version}"
},
"github": {
"release": true
},
"npm": {
"publish": false
},
"plugins": {
"@release-it/conventional-changelog": {
"infile": "CHANGELOG.md",
"preset": {
"name": "conventionalcommits",
"types": [
{
"type": "feat",
"section": "✨ Features"
},
{
"type": "fix",
"section": "🐛 Bug Fixes"
},
{
"type": "chore",
"hidden": false,
"section": "🚚 Chores"
},
{
"type": "docs",
"hidden": false,
"section": "📝 Documentation"
},
{
"type": "style",
"hidden": false,
"section": "💄 Styling"
},
{
"type": "refactor",
"hidden": false,
"section": "♻️ Code Refactoring"
},
{
"type": "perf",
"hidden": false,
"section": "⚡️ Performance Improvements"
},
{
"type": "test",
"hidden": false,
"section": "✅ Testing"
}
]
}
}
}
}