-
Notifications
You must be signed in to change notification settings - Fork 0
/
release.config.js
29 lines (25 loc) · 983 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
// 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.
It also set an environment variable "release" indicating that the release was successful.
*/
const publishCommands = `
git tag -a -f \${nextRelease.version} \${nextRelease.version} -F CHANGELOG.md || exit 2
git push --force origin \${nextRelease.version} || exit 3
echo "release_status=released" >> $GITHUB_ENV
echo "CONTAINER_VERSION="\${nextRelease.version} >> $GITHUB_ENV
`
// Only release on branch main
const releaseBranches = ["main"]
config.branches = releaseBranches
config.plugins.push(
// Custom release commands
["@semantic-release/exec", {
"publishCmd": publishCommands,
}],
"@semantic-release/github",
"@semantic-release/git",
)
// JS Semantic Release configuration must export the JS configuration object
module.exports = config