-
Notifications
You must be signed in to change notification settings - Fork 33
Expand file tree
/
Copy pathrelease.config.cjs
More file actions
78 lines (68 loc) · 1.85 KB
/
release.config.cjs
File metadata and controls
78 lines (68 loc) · 1.85 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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
const configuration = {
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}',
},
]);
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,
},
]);
}
module.exports = configuration;