workflow: fix release script in actions

This commit is contained in:
Evan You 2024-08-08 21:42:43 +08:00
parent c6841bdf4e
commit e33331275d
No known key found for this signature in database
GPG Key ID: 00E9AB7A6704CE0A
1 changed files with 1 additions and 7 deletions

View File

@ -499,15 +499,9 @@ async function publishPackages(version) {
if (isDryRun) {
additionalPublishFlags.push('--dry-run')
}
if (isDryRun || skipGit) {
if (isDryRun || skipGit || process.env.CI) {
additionalPublishFlags.push('--no-git-checks')
}
// bypass the pnpm --publish-branch restriction which isn't too useful to us
// otherwise it leads to a prompt and blocks the release script
const branch = await getBranch()
if (branch !== 'main') {
additionalPublishFlags.push('--publish-branch', branch)
}
// add provenance metadata when releasing from CI
// canary release commits are not pushed therefore we don't need to add provenance
if (process.env.CI && !isCanary) {