-
Notifications
You must be signed in to change notification settings - Fork 0
/
.releaserc.js
108 lines (108 loc) · 2.89 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
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
103
104
105
106
107
108
/**
* @type {import('semantic-release').GlobalConfig}
*/
module.exports = {
branches: [
//👇 Fake branch so that we can release beta versions in `main`
// until we can release 1.0.0
'semantic-release',
{ name: 'main', prerelease: 'beta', channel: false },
],
plugins: [
'@semantic-release/commit-analyzer',
'@semantic-release/release-notes-generator',
[
'@semantic-release/npm',
//👇 Publish built version
{
pkgRoot: './projects/ngx-meta/dist',
tarballDir: './projects/ngx-meta/dist',
npmPublish: true,
},
],
['@semantic-release/github', { assets: './projects/ngx-meta/dist/*.tgz' }],
[
'@semantic-release/changelog',
{
changelogFile: 'projects/ngx-meta/src/CHANGELOG.md',
},
],
],
//👇 Add library name in tag
tagFormat: 'ngx-meta-v${version}',
preset: 'conventionalcommits',
presetConfig: {
header: 'CHANGELOG',
types: [
{
type: 'feat',
section: 'Features',
},
{
type: 'fix',
section: 'Bug Fixes',
},
{
type: 'perf',
section: 'Performance Improvements',
},
{
type: 'revert',
section: 'Reverts',
},
{
type: 'docs',
section: 'Documentation',
},
{
type: 'style',
section: 'Style',
},
{
type: 'chore',
section: 'Miscellaneous Chores',
},
{
type: 'refactor',
section: 'Code Refactoring',
},
{
type: 'test',
section: 'Tests',
},
{
type: 'build',
section: 'Build System',
},
{
type: 'ci',
section: 'Continuous (Integration|Deployment)',
},
],
},
releaseRules: [
{
// Commit type depends on preset
// https://github.com/semantic-release/commit-analyzer/blob/v11.1.0/README.md#specific-commit-properties
// https://github.com/conventional-changelog/conventional-changelog/tree/conventional-commits-parser-v5.0.0/packages/conventional-commits-parser#usage
// https://github.com/conventional-changelog/conventional-changelog/tree/conventional-changelog-conventionalcommits-v7.0.2/packages/conventional-changelog-conventionalcommits
// 👇 Maintenance releases. For instance when updating dependencies
type: 'chore',
scope: 'release',
subject: '*maintenance*',
release: 'patch',
},
// Trigger a beta release
{
body: '*BETA RELEASE*',
release: 'patch',
},
],
writerOpts: {
//👇 Add library name in release notes
// https://github.com/conventional-changelog/conventional-changelog/tree/conventional-changelog-writer-v7.0.1/packages/conventional-changelog-writer#finalizecontext
finalizeContext: (context) => {
return { ...context, version: `\`ngx-meta\` v${context.version}` }
},
},
}