- Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrelease.config.cjs
72 lines (62 loc) · 1.7 KB
/
release.config.cjs
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
constconfiguration={
branches: [
'main',
{
channel: 'next',
name: 'develop',
prerelease: true,
},
],
plugins: [],
};
configuration.plugins.push([
'@semantic-release/commit-analyzer',
{
parserOpts: {
noteKeywords: ['BREAKING CHANGE','BREAKING CHANGES'],
},
releaseRules: [
{release: 'patch',scope: 'deps',type: 'chore'},
{release: 'patch',scope: 'package',type: 'chore'},
{release: 'patch',scope: 'deps',type: 'build'},
{release: 'patch',type: 'docs'},
],
},
]);
configuration.plugins.push('@semantic-release/release-notes-generator');
if(process.env.BRANCH==='main'){
configuration.plugins.push('@semantic-release/changelog');
}
configuration.plugins.push('semantic-release-license');
configuration.plugins.push('@semantic-release/npm');
configuration.plugins.push([
'@semantic-release/exec',
{
prepareCmd: './.github/workflows/build.sh',
},
]);
configuration.plugins.push([
'@semantic-release/github',
{
assignees: process.env.GH_OWNER,
labels: false,
},
]);
configuration.plugins.push([
'@semantic-release/git',
{
assets: ['CHANGELOG.md','LICENSE'],
message:
'chore(release): :bookmark: ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}',
},
]);
configuration.plugins.push([
'@qiwi/semantic-release-gh-pages-plugin',
{
dst: `./${process.env.BRANCH}`,
msg: 'docs: Updated for <%= nextRelease.gitTag %>',
pullTagsBranch: 'main',
src: './docs',
},
]);
module.exports=configuration;