From 2882775f78db7289ba5fc6e57773b63ab2f3b3e3 Mon Sep 17 00:00:00 2001 From: Fabian Feichter Date: Mon, 19 Oct 2020 11:05:25 +0200 Subject: [PATCH] version bump is not pushed when tag should not pushed --- index.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/index.js b/index.js index a9ef6be..eb91091 100644 --- a/index.js +++ b/index.js @@ -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"') } + 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') { - 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']) + } else { + await tools.runInWorkspace('git', ['push', remoteRepo]) } } catch (e) { tools.log.fatal(e)