support v1

This commit is contained in:
phips28 2020-04-04 01:39:59 +02:00
parent e8e51544ee
commit 966efc31a3
1 changed files with 7 additions and 0 deletions

View File

@ -54,6 +54,13 @@ Toolkit.run(async tools => {
newVersion = execSync(`npm version --git-tag-version=false ${version}`).toString().trim()
newVersion = `${process.env['INPUT_TAG-PREFIX']}${newVersion}`
console.log('new version:', newVersion)
try {
// to support "actions/checkout@v1"
await tools.runInWorkspace('git', ['commit', '-a', '-m', `ci: ${commitMessage} ${newVersion}`])
} catch (e) {
console.warn('git commit failed because you are using "actions/checkout@v2"; ' +
'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`
// console.log(Buffer.from(remoteRepo).toString('base64'))