From b37d4de55aad000abdd52ca15bff2c971cbe12ca Mon Sep 17 00:00:00 2001 From: Mikeal Rogers Date: Mon, 9 Sep 2019 21:13:27 +0000 Subject: [PATCH] debug: configure git for push but don't push --- merge-release-run.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/merge-release-run.js b/merge-release-run.js index 6ff4652..1006a6d 100644 --- a/merge-release-run.js +++ b/merge-release-run.js @@ -48,6 +48,15 @@ const run = async () => { const runExec = str => process.stdout.write(execSync(str)) + + /* configure git */ + const { GITHUB_ACTOR, GITHUB_TOKEN, GITHUB_REPOSITORY } = process.env + const remote = `https://${GITHUB_ACTOR}:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git` + console.log({ remote }) + runExec(`git remote add publish ${remote}`) + runExec(`git config user.name "Merge Release"`) + runExec(`git config user.email "merge-release@users.noreply.github.com"`) + let current = execSync(`npm view ${pkg.name} version`).toString() runExec(`npm version --allow-same-version=true --git-tag-version=false ${current} `) let newVersion = execSync(`npm version --git-tag-version=false ${version}`).toString()