From aadd9ddd7225830fb75dce5adf37c9d2e7331e31 Mon Sep 17 00:00:00 2001 From: phips28 Date: Sat, 26 Oct 2019 20:28:45 +0200 Subject: [PATCH] fix git push --- gh-action-bump-version-run.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/gh-action-bump-version-run.js b/gh-action-bump-version-run.js index 201ed4a..e2e15f1 100644 --- a/gh-action-bump-version-run.js +++ b/gh-action-bump-version-run.js @@ -35,8 +35,12 @@ const run = async () => { let newVersion = execSync(`npm version --git-tag-version=false ${version}`).toString() console.log('new version:', newVersion) exec(`git commit -a -m 'ci: ${commitMessage} ${newVersion}'`) - exec(`git push`) + + const remoteRepo = `https://${process.env.GITHUB_ACTOR}:${process.env.GITHUB_TOKEN}@github.com/${process.env.GITHUB_REPOSITORY}.git` + console.log('remoteRepo:', remoteRepo) + exec(`git tag ${newVersion}`) + exec(`git push "${remoteRepo}" --follow-tags`) exec(`git push --tags`) } run()