-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrelease.config.base.cjs
89 lines (85 loc) · 1.75 KB
/
release.config.base.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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
/* eslint-disable no-template-curly-in-string */
const config = {
noCi: true,
branches: [
{name: 'master'},
{name: 'main'},
{name: '+([0-9])?(.{+([0-9]),x}).x'},
{
name: 'release/*',
channel: '${name.replace(/^release\\//g, "")}',
prerelease: '${name.replace(/^release\\//g, "")}'
}
],
assets: [],
npmPublish: false,
linkReferences: false,
pkgRoot: './',
changelogFile: './CHANGELOG.md',
plugins: [
[
'@semantic-release/commit-analyzer',
{
preset: 'angular',
releaseRules: [
{
type: 'chore',
release: 'patch'
},
{
type: 'docs',
release: 'patch'
},
{
type: 'refactor',
release: 'patch'
},
{
type: 'style',
release: 'patch'
},
{
type: 'revert',
release: 'patch'
}
]
}
],
[
"@semantic-release/release-notes-generator",
{
"preset": "conventionalcommits",
"parserOpts": {
"noteKeywords": ["BREAKING CHANGE", "BREAKING CHANGES", "BREAKING"]
},
}
],
'@semantic-release/npm',
'@semantic-release/changelog',
[
'@semantic-release/git',
{
assets: ['./package.json', './package-lock.json', './CHANGELOG.md', '.docker/docker-compose.deploy.yml', 'reports/*'],
message: 'build: release ${nextRelease.version}\n\n${nextRelease.notes}'
}
]
]
};
if (process.env.GH_TOKEN || process.env.GITHUB_TOKEN) {
config.plugins.push('@semantic-release/github');
}
if (process.env.GL_TOKEN) {
config.plugins.push('@semantic-release/gitlab');
}
if (process.env.SLACK_WEBHOOK) {
config.plugins.push([
'semantic-release-slack-bot',
{
notifyOnSuccess: true,
notifyOnFail: true,
markdownReleaseNotes: true
}
]);
}
module.exports = config;
/* eslint-enable no-template-curly-in-string */