-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy path.release-it.ts
More file actions
59 lines (54 loc) · 1.47 KB
/
.release-it.ts
File metadata and controls
59 lines (54 loc) · 1.47 KB
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
import type { Config } from 'release-it';
const config: Config = {
git: {
commitMessage: 'chore(release): v${version}',
tagName: 'v${version}',
requireBranch: false,
requireCleanWorkingDir: false,
push: false,
commit: true,
tag: false,
},
github: {
release: false,
releaseName: 'v${version}',
draft: false,
preRelease: false,
},
npm: {
publish: false,
},
hooks: {
'before:init': ['npm run build'],
'after:release': 'echo Successfully prepared release v${version}',
},
plugins: {
'@release-it/conventional-changelog': {
preset: 'angular',
infile: 'CHANGELOG.md',
parserOpts: {
headerPattern: /^(?:\[(.*)\]\s*)?(\w*)(?:\((.*)\))?: (.*)$/,
headerCorrespondence: ['ticket', 'type', 'scope', 'subject'],
},
writerOpts: {
transform: (commit: any) => {
// Make sure chore commits are included
if (commit.type === 'feat') {
commit.type = '✨ Features';
} else if (commit.type === 'fix') {
commit.type = '🐛 Bug Fixes';
} else if (commit.type === 'chore') {
commit.type = '🔧 Chores';
} else if (commit.type === 'refactor') {
commit.type = '♻️ Refactoring';
} else {
return; // Hide other types
}
commit.subject = commit.header
return commit;
},
},
},
},
};
export default config;