generated from JS-AK/example-automatic-deploy-ts-app-to-npm-with-scope
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.releaserc.cjs
38 lines (35 loc) · 1.01 KB
/
.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
38
const ref = process.env.GITHUB_REF;
const branch = ref.split('/').pop();
function getPlugins() {
if (['dev', 'master', 'next'].includes(branch)) {
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, },
{ name: 'next', prerelease: true, },
],
plugins: getPlugins(),
}