-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathrelease.config.js
63 lines (59 loc) · 2.27 KB
/
release.config.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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
const branch = process.env.CURRENT_BRANCH || "main";
if (!branch) {
throw new Error("CURRENT_BRANCH not set");
}
/**
* @type {import("semantic-release").GlobalConfig}
*/
const config = {
branches: ["main"],
repositoryUrl: "https://github.com/JamsRepos/Jamfin.git",
plugins: [
[
"@semantic-release/commit-analyzer",
{
releaseRules: [
{ scope: "no-release", release: false },
{ type: "build", release: "patch" },
{ type: "ci", release: "patch" },
{ type: "chore", release: "patch" },
{ type: "docs", release: false },
{ type: "refactor", release: "patch" },
{ type: "style", release: "patch" },
{ breaking: true, release: "major" },
],
},
],
[
"@semantic-release/release-notes-generator",
{
preset: "conventionalcommits",
presetConfig: {
types: [
{ type: "feat", section: "New Features" },
{ type: "fix", section: "Bug Fixes" },
{ type: "perf", section: "Performance Improvements", hidden: false },
{ type: "revert", section: "Commit Reverts", hidden: false },
{ type: "build", section: "Build System", hidden: false },
{ type: "ci", section: "Continuous Integration", hidden: false },
{ type: "chore", section: "Chores", hidden: false },
{ type: "docs", section: "Documentation", hidden: false },
{ type: "style", section: "Style Changes", hidden: false },
{ type: "refactor", section: "Code Refactoring", hidden: false },
{ type: "test", section: "Test Cases", hidden: true },
],
},
},
],
[
"@semantic-release/exec",
{
successCmd: "node release.purge.js"
}
]
],
};
if (branch === "main") {
config.plugins.splice(-2, 0, "@semantic-release/github");
}
module.exports = config;