generated from sebbo2002/js-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
release.config.cjs
72 lines (61 loc) · 1.97 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
const configuration = {
'branches': [
'main',
{
'name': 'develop',
'channel': 'next',
'prerelease': true
}
],
'plugins': []
};
configuration.plugins.push(['@semantic-release/commit-analyzer', {
'releaseRules': [
{'type': 'chore', 'scope': 'deps', 'release': 'patch'},
{'type': 'chore', 'scope': 'package', 'release': 'patch'},
{'type': 'build', 'scope': 'deps', 'release': 'patch'},
{'type': 'docs', 'release': 'patch'}
],
'parserOpts': {
'noteKeywords': [
'BREAKING CHANGE',
'BREAKING CHANGES'
]
}
}]);
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', {
'labels': false,
'assignees': process.env.GH_OWNER
}]);
configuration.plugins.push(['@semantic-release/git', {
'assets': ['CHANGELOG.md', 'LICENSE'],
'message': 'chore(release): :bookmark: ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}'
}]);
const dockerImages = [];
if (process.env.DOCKER_LOCAL_IMAGE_DH) {
dockerImages.push(process.env.DOCKER_LOCAL_IMAGE_DH);
}
if (process.env.DOCKER_LOCAL_IMAGE_GH) {
dockerImages.push(process.env.DOCKER_LOCAL_IMAGE_GH);
}
if(dockerImages.length > 0) {
configuration.plugins.push(['@sebbo2002/semantic-release-docker', {
images: dockerImages
}]);
}
configuration.plugins.push(['@qiwi/semantic-release-gh-pages-plugin', {
'msg': 'docs: Updated for <%= nextRelease.gitTag %>',
'src': './docs',
'dst': `./${process.env.BRANCH}`,
'pullTagsBranch': 'main'
}]);
module.exports = configuration;