From ba1282040079b8dc905c149e7fe0a9f972b67e45 Mon Sep 17 00:00:00 2001 From: phips28 Date: Sat, 26 Oct 2019 21:47:47 +0200 Subject: [PATCH] fix tag command --- index.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/index.js b/index.js index 830abe9..0624d96 100644 --- a/index.js +++ b/index.js @@ -3,11 +3,10 @@ const { execSync } = require('child_process') // Run your GitHub Action! Toolkit.run(async tools => { - console.log('context:', tools.context) const pkg = tools.getPackageJSON() const event = tools.context.payload - console.log('event:', event) + // console.log('event:', event) const messages = event.commits.map(commit => commit.message + '\n' + commit.body) @@ -41,9 +40,8 @@ Toolkit.run(async tools => { const remoteRepo = `https://${process.env.GITHUB_ACTOR}:${process.env.GITHUB_TOKEN}@github.com/${process.env.GITHUB_REPOSITORY}.git` console.log('remoteRepo:', remoteRepo) - console.log('remoteRepo:', tools.context.repo) - await tools.runInWorkspace('git', ['tag', '-a', newVersion]) + await tools.runInWorkspace('git', ['tag', `-a "${newVersion}"`]) await tools.runInWorkspace('git', ['push', `"${remoteRepo}"`, '--follow-tags']) await tools.runInWorkspace('git', ['push', `"${remoteRepo}"`, '--tags']) } catch (e) {