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