test checkout v2

This commit is contained in:
phips28 2020-04-03 13:04:35 +02:00
parent 78011c267c
commit a5b2f289e9
2 changed files with 2 additions and 3 deletions

View File

@ -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:

View File

@ -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')