-
Notifications
You must be signed in to change notification settings - Fork 0
/
release.npm-pre.cjs
29 lines (29 loc) · 1 KB
/
release.npm-pre.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
/**
* @type {import('semantic-release').GlobalConfig}
*/
module.exports = {
branches: [
{ name: "develop", channel: "develop" }
],
plugins: [
"@semantic-release/commit-analyzer",
[
"@semantic-release/exec",
{
prepareCmd: "npm ci",
// semantic-release always creates a tag, so it will be deleted in case of fail
failCmd: "git push origin :refs/tags/${nextRelease.gitTag}",
}
],
"@semantic-release/npm",
[
"@semantic-release/exec",
{
prepareCmd: "npm version --no-git-tag-version ${nextRelease.version}-${nextRelease.channel ?? process.env.GITHUB_REF_NAME}-${Date.now()}-${process.env.GITHUB_SHA_SHORT}",
// semantic-release always creates a tag, so it will be deleted afterwards
successCmd: "git push origin :refs/tags/${nextRelease.gitTag}",
}
]
],
preset: "conventionalcommits"
}