mirror of
https://github.com/Kaelio/ktx.git
synced 2026-06-25 08:48:08 +02:00
fix: prevent stable release pushes to main (#145)
This commit is contained in:
parent
7110aa6f5c
commit
03e2f9f0a3
3 changed files with 51 additions and 12 deletions
|
|
@ -90,6 +90,26 @@ function releaseTag(kind) {
|
|||
return kind === 'rc' ? 'next' : 'latest';
|
||||
}
|
||||
|
||||
function releaseChangelogPlugins(kind) {
|
||||
return kind === 'rc' ? ['@semantic-release/changelog'] : [];
|
||||
}
|
||||
|
||||
function releaseGitPlugins(kind) {
|
||||
if (kind !== 'rc') {
|
||||
return [];
|
||||
}
|
||||
|
||||
return [
|
||||
[
|
||||
'@semantic-release/git',
|
||||
{
|
||||
assets: ['CHANGELOG.md', 'package.json', 'release-policy.json'],
|
||||
message: 'chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}',
|
||||
},
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
function releaseBranches(env = process.env) {
|
||||
const branch = currentBranch(env);
|
||||
const kind = releaseKind(env);
|
||||
|
|
@ -138,7 +158,7 @@ function createReleaseConfig(env = process.env) {
|
|||
},
|
||||
],
|
||||
'./scripts/semantic-release-version-policy.cjs',
|
||||
'@semantic-release/changelog',
|
||||
...releaseChangelogPlugins(kind),
|
||||
[
|
||||
'@semantic-release/exec',
|
||||
{
|
||||
|
|
@ -153,13 +173,7 @@ function createReleaseConfig(env = process.env) {
|
|||
].join(' && '),
|
||||
},
|
||||
],
|
||||
[
|
||||
'@semantic-release/git',
|
||||
{
|
||||
assets: ['CHANGELOG.md', 'package.json', 'release-policy.json'],
|
||||
message: 'chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}',
|
||||
},
|
||||
],
|
||||
...releaseGitPlugins(kind),
|
||||
[
|
||||
'@semantic-release/github',
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue