From 20091815db33630d6ebf064b36eb80cf49f0b63f Mon Sep 17 00:00:00 2001 From: phips28 Date: Sun, 27 Oct 2019 01:39:43 +0200 Subject: [PATCH] checkout the current branch --- .github/workflows/push.yml | 2 ++ index.js | 1 - 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 4d059a4..eceb38a 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -13,6 +13,8 @@ jobs: steps: - name: "Checkout source code" uses: "actions/checkout@v1" + with: + ref: ${{ github.ref }} - name: "Setup Node.js" uses: "actions/setup-node@v1" with: diff --git a/index.js b/index.js index 6140c2f..c62fe7f 100644 --- a/index.js +++ b/index.js @@ -29,7 +29,6 @@ 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"']) - await tools.runInWorkspace('git', ['checkout', 'master']) await tools.runInWorkspace('npm', ['version', '--allow-same-version=true', '--git-tag-version=false', current]) console.log('current:', current, '/', 'version:', version)