-
Notifications
You must be signed in to change notification settings - Fork 0
/
.releaserc.cjs
37 lines (34 loc) · 975 Bytes
/
.releaserc.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
const ref = process.env.GITHUB_REF;
const branch = ref.split('/').pop();
function getPlugins() {
if (branch === 'master') {
return [
'@semantic-release/commit-analyzer',
'@semantic-release/release-notes-generator',
['@semantic-release/changelog', { changelogFile: 'CHANGELOG.md' }],
['@semantic-release/npm'],
['@semantic-release/git', {
assets: ['CHANGELOG.md', 'package.json', 'package-lock.json'],
message: '${nextRelease.version} CHANGELOG [skip ci]\n\n${nextRelease.notes}',
}],
'@semantic-release/github',
];
}
return [
'@semantic-release/commit-analyzer',
'@semantic-release/release-notes-generator',
['@semantic-release/npm'],
['@semantic-release/git', {
assets: ['package.json'],
message: '${nextRelease.version} CHANGELOG [skip ci]\n\n${nextRelease.notes}',
}],
'@semantic-release/github',
];
}
module.exports = {
branches: [
'master',
{ name: 'dev', prerelease: true, },
],
plugins: getPlugins(),
}