diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 45093a6..11a96df 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -3,7 +3,7 @@ name: "Bump Version" on: push: branches: - - "master" + - "checkout_v2" jobs: bump-version: @@ -12,7 +12,7 @@ jobs: steps: - name: "Checkout source code" - uses: "actions/checkout@v1" + uses: "actions/checkout@v2" with: ref: ${{ github.ref }} - name: "cat package.json" diff --git a/index.js b/index.js index 92fb48c..859e2ef 100644 --- a/index.js +++ b/index.js @@ -36,7 +36,7 @@ Toolkit.run(async tools => { 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)[1] - console.log('currentBranch:', currentBranch) + console.log('currentBranch:', currentBranch, process.env.GITHUB_REF) // do it in the current checked out github branch (DETACHED HEAD) // important for further usage of the package.json version