Merge pull request #49 from fafeichter/issue-48

version bump is not pushed when tag should not pushed
This commit is contained in:
Phil 2020-10-19 14:42:03 +02:00 committed by GitHub
commit 7a69b980d2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 2 deletions

View File

@ -105,12 +105,13 @@ Toolkit.run(async tools => {
'but that doesnt matter because you dont need that git commit, thats only for "actions/checkout@v1"') 'but that doesnt matter because you dont need that git commit, thats only for "actions/checkout@v1"')
} }
const remoteRepo = `https://${process.env.GITHUB_ACTOR}:${process.env.GITHUB_TOKEN}@github.com/${process.env.GITHUB_REPOSITORY}.git`
if (process.env['INPUT_SKIP-TAG'] !== 'true') { if (process.env['INPUT_SKIP-TAG'] !== 'true') {
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', ['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'])
} else {
await tools.runInWorkspace('git', ['push', remoteRepo])
} }
} catch (e) { } catch (e) {
tools.log.fatal(e) tools.log.fatal(e)