Skip to content

Commit

Permalink
fix(get-latest-release): allow using GIT_LOCAL_BRANCH on GH Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
tsvetomir committed Mar 5, 2021
1 parent 450efd0 commit 5b90cd4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion getLastRelease.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,12 @@ module.exports = function (pluginConfig, config, cb) {

if (config.env.TRAVIS) {
branch = config.env.TRAVIS_BRANCH;
} else if (config.env.GIT_LOCAL_BRANCH) {
branch = config.env.GIT_LOCAL_BRANCH;
} else if (config.env.GITHUB_REF) {
branch = utils.ghActionsBranch(config.env);
} else {
branch = config.env.GIT_LOCAL_BRANCH;
throw new Error('Unable to determine Git branch. Tried TRAVIS_BRANCH, GIT_LOCAL_BRANCH and GITHUB_REF');
}

const distTag = config.options.branchTags[branch];
Expand Down

0 comments on commit 5b90cd4

Please sign in to comment.