-
Notifications
You must be signed in to change notification settings - Fork 0
/
release.config.js
32 lines (28 loc) · 985 Bytes
/
release.config.js
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
// Load this configuration that provide all the base for working with conventional commits
const config = require('semantic-release-preconfigured-conventional-commits')
/*
Commands executed during release.
*/
const publishCommands = `
git tag -a -f \${nextRelease.version} \${nextRelease.version} -F CHANGELOG.md || exit 2
git push --force origin \${nextRelease.version} || exit 3
`
// Only release on branch main
const releaseBranches = ["main"]
config.branches = releaseBranches
config.plugins.push(
// Custom release commands
["@semantic-release/exec", {
"publishCmd": publishCommands,
}],
// Release also in GitHub
["@semantic-release/github", {
"assets": []
}],
["@semantic-release/git", {
"assets": ["CHANGELOG.md", "package.json"],
"message": "chore(release)!: [skip ci] ${nextRelease.version} released"
}]
)
// JS Semantic Release configuration must export the JS configuration object
module.exports = config