checkout current branch
This commit is contained in:
parent
ae38bb6a26
commit
8880505758
2
index.js
2
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.name', '"Automated Version Bump"'])
|
||||||
await tools.runInWorkspace('git', ['config', 'user.email', '"gh-action-bump-version@users.noreply.github.com"'])
|
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)
|
console.log('currentBranch:', currentBranch)
|
||||||
await tools.runInWorkspace('git', ['checkout', currentBranch])
|
await tools.runInWorkspace('git', ['checkout', currentBranch])
|
||||||
await tools.runInWorkspace('npm',
|
await tools.runInWorkspace('npm',
|
||||||
|
|
Loading…
Reference in New Issue