From e33331275d14e8c48a41d8170613d21d32482dca Mon Sep 17 00:00:00 2001 From: Evan You Date: Thu, 8 Aug 2024 21:42:43 +0800 Subject: [PATCH] workflow: fix release script in actions --- scripts/release.js | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/scripts/release.js b/scripts/release.js index a3517c30728..5cb492e2180 100644 --- a/scripts/release.js +++ b/scripts/release.js @@ -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) {