mirror of
https://github.com/chenasraf/simple-scaffold.git
synced 2026-05-18 01:29:09 +00:00
77 lines
1.9 KiB
JavaScript
77 lines
1.9 KiB
JavaScript
const releaseRules = [
|
|
{ type: "feat", section: "Features", release: "minor" },
|
|
{ type: "docs", section: "Misc", release: "patch" },
|
|
{ type: "fix", section: "Bug Fixes", release: "patch" },
|
|
{ type: "refactor", section: "Misc", release: "patch" },
|
|
{ type: "docs", section: "Build", release: "patch" },
|
|
{ type: "perf", section: "Misc", release: "patch" },
|
|
{ type: "build", section: "Build", release: "patch" },
|
|
{ type: "chore", section: "Misc", release: "patch" },
|
|
{ type: "test", section: "Misc", release: "patch" },
|
|
]
|
|
|
|
/** @type {import('semantic-release').Options} */
|
|
module.exports = {
|
|
branches: [
|
|
"+([0-9])?(.{+([0-9]),x}).x",
|
|
"master",
|
|
"next",
|
|
"next-major",
|
|
{ name: "beta", prerelease: true },
|
|
{ name: "alpha", prerelease: true },
|
|
],
|
|
analyzeCommits: {
|
|
path: "semantic-release-conventional-commits",
|
|
majorTypes: ["major", "breaking"],
|
|
minorTypes: ["minor", "feat", "feature"],
|
|
patchTypes: ["patch", "fix", "bugfix", "refactor", "perf", "revert"],
|
|
},
|
|
plugins: [
|
|
[
|
|
"@semantic-release/commit-analyzer",
|
|
{
|
|
preset: "conventionalcommits",
|
|
parserOpts: {
|
|
noteKeywords: ["breaking:", "breaking-fix:", "breaking-feat:"],
|
|
},
|
|
releaseRules: releaseRules,
|
|
},
|
|
],
|
|
[
|
|
"@semantic-release/release-notes-generator",
|
|
{
|
|
preset: "conventionalcommits",
|
|
parserOpts: {
|
|
noteKeywords: ["breaking"],
|
|
types: releaseRules,
|
|
},
|
|
},
|
|
],
|
|
[
|
|
"@semantic-release/changelog",
|
|
{
|
|
changelogFile: "CHANGELOG.md",
|
|
changelogTitle: "# Change Log",
|
|
},
|
|
],
|
|
[
|
|
"@semantic-release/npm",
|
|
{
|
|
packageRoot: "dist",
|
|
},
|
|
],
|
|
[
|
|
"@semantic-release/github",
|
|
{
|
|
assets: ["package.tgz"],
|
|
},
|
|
],
|
|
[
|
|
"@semantic-release/git",
|
|
{
|
|
assets: ["CHANGELOG.md", "package.json"],
|
|
},
|
|
],
|
|
],
|
|
}
|