test checkout v2
This commit is contained in:
parent
78011c267c
commit
a5b2f289e9
|
@ -20,7 +20,7 @@ jobs:
|
|||
- name: "Setup Node.js"
|
||||
uses: "actions/setup-node@v1"
|
||||
with:
|
||||
node-version: 8.10.0
|
||||
node-version: 12
|
||||
- name: "Automated Version Bump"
|
||||
uses: "phips28/gh-action-bump-version@checkout_v2"
|
||||
with:
|
||||
|
|
3
index.js
3
index.js
|
@ -54,13 +54,12 @@ Toolkit.run(async tools => {
|
|||
newVersion = execSync(`npm version --git-tag-version=false ${version}`).toString().trim()
|
||||
newVersion = `${process.env['INPUT_TAG-PREFIX']}${newVersion}`
|
||||
console.log('new version:', newVersion)
|
||||
console.log('before remoteRepo')
|
||||
|
||||
const remoteRepo = `https://${process.env.GITHUB_ACTOR}:${process.env.GITHUB_TOKEN}@github.com/${process.env.GITHUB_REPOSITORY}.git`
|
||||
// console.log(Buffer.from(remoteRepo).toString('base64'))
|
||||
await tools.runInWorkspace('git', ['tag', newVersion])
|
||||
await tools.runInWorkspace('git', ['push', remoteRepo, '--follow-tags'])
|
||||
await tools.runInWorkspace('git', ['push', remoteRepo, '--tags'])
|
||||
console.log('after git push')
|
||||
} catch (e) {
|
||||
tools.log.fatal(e)
|
||||
tools.exit.failure('Failed to bump version')
|
||||
|
|
Loading…
Reference in New Issue