Skip to content

Commit 5ff03b4

Browse files
committed
feat: Add ALLOW_RELEASE_CANDIDATE_GH_RELEASE env option
1 parent d74c9db commit 5ff03b4

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

index.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,9 @@ function git_tag(version) {
122122
}
123123

124124
function github_release(version) {
125-
if (version.preid === RC_PREID) return version
125+
if (version.preid === RC_PREID && !process.env.ALLOW_RELEASE_CANDIDATE_GH_RELEASE) {
126+
return version
127+
}
126128
if (!process.env.GITHUB_OAUTH_TOKEN) {
127129
console.log('Cannot run conventionalGithubReleaser. You must add a .env file with a GITHUB_OAUTH_TOKEN key')
128130
return version
@@ -154,6 +156,6 @@ get_all_versions()
154156
.then(git_push)
155157
.then(notify('- git tag', !process.env.ALLOW_RELEASE_CANDIDATE_TAG))
156158
.then(git_tag)
157-
.then(notify('- Github release', true))
159+
.then(notify('- Github release', !process.env.ALLOW_RELEASE_CANDIDATE_GH_RELEASE))
158160
.then(github_release)
159161
.catch((err) => console.log(err))

0 commit comments

Comments
 (0)