Skip to content

Commit c33aa28

Browse files
committed
fix (verify-conditions): allow using GIT_LOCAL_BRANCH on GH Actions
1 parent 5b90cd4 commit c33aa28

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

verifyConditions.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,17 @@
11
const utils = require('./utils');
22

33
module.exports = function (pluginConfig, config, cb) {
4-
let branch;
54
let defaultVerifyConditions;
65

76
if (config.env.TRAVIS) {
87
defaultVerifyConditions = require('@semantic-release/condition-travis');
9-
branch = config.env.TRAVIS_BRANCH;
108
} else if (config.env.GITHUB_REF) {
119
defaultVerifyConditions = require('./condition-github-actions');
12-
branch = utils.ghActionsBranch(config.env);
1310
} else {
1411
defaultVerifyConditions = require('@krux/condition-jenkins');
15-
branch = config.env.GIT_LOCAL_BRANCH;
1612
}
13+
14+
const branch = config.env.TRAVIS_BRANCH || config.env.GIT_LOCAL_BRANCH || utils.ghActionsBranch(config.env);
1715

1816
// update semantic-release configuration to publish:
1917
// - from this branch

0 commit comments

Comments
 (0)