59 lines
2.6 KiB
JavaScript
59 lines
2.6 KiB
JavaScript
/**
|
|
* @type {import('semantic-release').GlobalConfig}
|
|
*/
|
|
module.exports = {
|
|
branches: ['main'],
|
|
plugins: [
|
|
[
|
|
'@semantic-release/commit-analyzer',
|
|
{
|
|
"preset": "conventionalcommits",
|
|
"releaseRules": [
|
|
{"type": "docs", "scope": "README", "release": "patch"},
|
|
{"type": "feat", scope: "ci", release: "patch"},
|
|
{"type": "feature", scope: "ci", release: "patch"},
|
|
{"type": "refactor", "release": "patch"},
|
|
{"type": "style", "release": "patch"}
|
|
],
|
|
}
|
|
],
|
|
[
|
|
'@semantic-release/release-notes-generator',
|
|
{
|
|
"preset": "conventionalcommits",
|
|
"presetConfig": {
|
|
types: [
|
|
{"type": "breaking", "section": "Major version release", "hidden": false},
|
|
{"type": "BREAKING", "section": "Major version release", "hidden": false},
|
|
{"type": "BREAKING CHANGE", "section": "Major version release", "hidden": false},
|
|
{"type": "BREAKING CHANGES", "section": "Major version release", "hidden": false},
|
|
{"type": "feat", "section": "Features", "hidden": false},
|
|
{"type": "fix", "section": "Bug Fixes", "hidden": false},
|
|
{"type": "hotfix", "section": "Bug Fixes", "hidden": false},
|
|
{"type": "update", "section": "Updates", "hidden": false},
|
|
{"type": "upgrade", "section": "Upgrades", "hidden": false},
|
|
{"type": "docs", "section": "Documentation", "hidden": false},
|
|
{"type": "build", "section": "CI/CD Changes", "hidden": false},
|
|
{"type": "ci", "section": "CI/CD Changes", "hidden": false},
|
|
{"type": "refactor", "section": "Refactoring", "hidden": false},
|
|
{"type": "perf", "section": "Performance Improvements", "hidden": false}
|
|
]
|
|
}
|
|
}
|
|
],
|
|
[
|
|
"@semantic-release/exec",
|
|
{
|
|
publishCmd: 'echo -e "${nextRelease.notes}\n\n$(cat CHANGELOG.md)" > CHANGELOG.md'
|
|
}
|
|
],
|
|
'@semantic-release/git',
|
|
[
|
|
"@semantic-release/exec",
|
|
{
|
|
"publishCmd": 'echo "${nextRelease.notes}" > /tmp/release-notes.md; goreleaser release --release-notes /tmp/release-notes.md --clean'
|
|
}
|
|
]
|
|
],
|
|
};
|