test checkout v2
This commit is contained in:
parent
118c20934f
commit
9933542c75
|
@ -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"
|
||||
|
|
2
index.js
2
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
|
||||
|
|
Loading…
Reference in New Issue