-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrelease.config.js
102 lines (99 loc) · 2.45 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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
const COMMIT_GROUP_ORDER = [
'Features',
'Bug Fixes',
'Performance Improvements',
'Code Refactoring',
'Miscellaneous Chores',
'Documentation Changes',
'Tests',
'Build System',
'Reverts',
'Dependency Updates',
];
module.exports = {
branches: [
'main',
{
name: 'canary',
channel: 'canary',
prerelease: 'canary',
},
],
plugins: [
[
'@semantic-release/commit-analyzer',
{
preset: 'angular',
releaseRules: [
{
type: 'release',
release: 'patch',
},
],
},
],
[
'@semantic-release/release-notes-generator',
{
preset: 'conventionalcommits',
writerOpts: {
commitGroupsSort: (a, b) => {
const rankA = COMMIT_GROUP_ORDER.indexOf(a.title);
const rankB = COMMIT_GROUP_ORDER.indexOf(b.title);
if (rankA >= rankB) return 1;
return -1;
},
},
presetConfig: {
types: [
{ type: 'perf', section: 'Performance Improvements' },
{ type: 'refactor', section: 'Code Refactoring' },
{ type: 'test', section: 'Tests' },
{ type: 'docs', section: 'Documentation Changes' },
{ type: 'build', section: 'Build System' },
{ type: 'revert', section: 'Reverts' },
{ type: 'fix', scope: 'deps', section: 'Dependency Updates' },
{ type: 'fix', section: 'Bug Fixes' },
{ type: 'feat', section: 'Features' },
{ type: 'feature', section: 'Features' },
{ type: 'chore', scope: 'release', hidden: true },
{ type: 'chore', scope: 'deps', section: 'Dependency Updates' },
{ type: 'chore', section: 'Miscellaneous Chores' },
],
},
},
],
[
'@semantic-release/changelog',
{
changelogFile: 'CHANGELOG.md',
},
],
[
'@semantic-release/npm',
{
tarballDir: '.tarball',
},
],
[
'@semantic-release/git',
{
message:
'chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}',
assets: [
'CHANGELOG.md',
'package.json',
'package-lock.json',
'npm-shrinkwrap.json',
],
},
],
[
'@semantic-release/github',
{
assets: '.tarball/*.tgz',
},
],
],
};
/* eslint no-template-curly-in-string: 0 */