support v1
This commit is contained in:
parent
e8e51544ee
commit
966efc31a3
7
index.js
7
index.js
|
@ -54,6 +54,13 @@ Toolkit.run(async tools => {
|
||||||
newVersion = execSync(`npm version --git-tag-version=false ${version}`).toString().trim()
|
newVersion = execSync(`npm version --git-tag-version=false ${version}`).toString().trim()
|
||||||
newVersion = `${process.env['INPUT_TAG-PREFIX']}${newVersion}`
|
newVersion = `${process.env['INPUT_TAG-PREFIX']}${newVersion}`
|
||||||
console.log('new version:', 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`
|
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'))
|
// console.log(Buffer.from(remoteRepo).toString('base64'))
|
||||||
|
|
Loading…
Reference in New Issue