-
Notifications
You must be signed in to change notification settings - Fork 0
/
.release-it.js
63 lines (60 loc) · 1.39 KB
/
.release-it.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 typeMap = {
feat: '🎸 Features',
fix: '🐛 Bug Fixes',
perf: '⚡ Performance Improvements',
revert: '⏪ Reverts',
docs: '✏️ Documentation',
style: '💄 Styles',
refactor: '💡 Code Refactoring',
test: '💍 Tests',
build: '👷 Build System',
ci: '🎡 Continuous Integration',
chore: '🤖 Chores',
release: '🏹 Release',
};
const createTypes = () => {
const types = [];
let i = 0;
for (key in typeMap) {
types.push({ type: key, section: typeMap[key], hidden: ++i > 4 });
}
return types;
};
const types = createTypes();
module.exports = {
git: {
commitMessage: 'chore: release v${version}',
tagName: 'v${version}',
},
npm: {
publish: true,
},
github: {
release: true,
releaseName: 'v${version}',
},
plugins: {
'@release-it/conventional-changelog': {
preset: {
name: 'conventionalcommits',
types,
preMajor: false,
},
infile: 'CHANGELOG.md',
header: '# Changelog',
ignoreRecommendedBump: false,
gitRawCommitsOpts: {
format:
'%B%n-hash-%n%H%n-gitTags-%n%d%n-committerDate-%n%ci%n-authorName-%n%an%n-authorEmail-%n%ae',
},
// append: false,
// releaseCount: 1,
},
// 'parserOpts': {
// mergePattern: '^Merge pull request #(\\d+) from (.*)$',
// },
// 'writerOpts': {
// groupBy: 'scope',
// },
},
};