From 888050575873c9936c5b0e14056e732dbaebf2de Mon Sep 17 00:00:00 2001 From: phips28 Date: Sun, 27 Oct 2019 01:54:32 +0200 Subject: [PATCH] checkout current branch --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index 8b03bf2..c8cf423 100644 --- a/index.js +++ b/index.js @@ -28,7 +28,7 @@ Toolkit.run(async tools => { await tools.runInWorkspace('git', ['config', 'user.name', '"Automated Version Bump"']) await tools.runInWorkspace('git', ['config', 'user.email', '"gh-action-bump-version@users.noreply.github.com"']) - const currentBranch = /refs\/[a-zA-Z]+\/(.*)/.exec(process.env.GITHUB_REF) + const currentBranch = /refs\/[a-zA-Z]+\/(.*)/.exec(process.env.GITHUB_REF)[1] console.log('currentBranch:', currentBranch) await tools.runInWorkspace('git', ['checkout', currentBranch]) await tools.runInWorkspace('npm',