-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.releaserc.js
43 lines (39 loc) · 1.14 KB
/
.releaserc.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
const presetConfig = {
types: [
{ type: "feat", section: "🚀 Features", hidden: false },
{ type: "fix", section: "🐛 Bug Fixes", hidden: false },
{ type: "docs", section: "📖 Docs", hidden: true },
{ type: "style", section: "🎨 Styles", hidden: true },
{ type: "refactor", section: "🔩 Refactor", hidden: true },
{ type: "perf", section: "⚡️ Performances", hidden: true },
{ type: "test", section: "✅ Tests", hidden: true },
{ type: "ci", section: "🔁 CI", hidden: true },
{ type: "chore", section: "🧹 Chore", hidden: true },
],
};
let config = {
branches: ["main"],
plugins: [],
};
const preparing = process.env.PREPARING;
const changelogPlugin = [
"@semantic-release/release-notes-generator",
{
presetConfig,
preset: "conventionalcommits",
linkCompare: !preparing,
linkReferences: !preparing,
},
];
if (preparing) {
config.plugins.push(changelogPlugin);
} else {
config.plugins = [
"@semantic-release/commit-analyzer",
changelogPlugin,
"@semantic-release/changelog",
"@semantic-release/github",
"@semantic-release/git"
]
}
module.exports = config;