feat: Update git commit to include the updated package json version
amend the updated package.json to the latest commit and use that for publishing then push the same commit to the repo. When the workflow gets triggered the hashes will be the same.
This commit is contained in:
parent
5213521185
commit
2a12a1679c
|
@ -50,8 +50,9 @@ const run = async () => {
|
||||||
process.stdout.write(execSync(`npm version --allow-same-version=true --git-tag-version=false ${current} `))
|
process.stdout.write(execSync(`npm version --allow-same-version=true --git-tag-version=false ${current} `))
|
||||||
let newVersion = execSync(`npm version --git-tag-version=false ${version}`).toString()
|
let newVersion = execSync(`npm version --git-tag-version=false ${version}`).toString()
|
||||||
console.log(newVersion)
|
console.log(newVersion)
|
||||||
|
process.stdout.write(execSync(`git commit -a --amend --no-edit`))
|
||||||
process.stdout.write(execSync(`npm publish --access=public`))
|
process.stdout.write(execSync(`npm publish --access=public`))
|
||||||
process.stdout.write(execSync(`git checkout package.json`))
|
process.stdout.write(execSync(`git push`))
|
||||||
await git.addTag(newVersion)
|
await git.addTag(newVersion)
|
||||||
await git.pushTags('origin')
|
await git.pushTags('origin')
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue