From 0469beaf60b738a87b8fc99eea8b19342c67265a Mon Sep 17 00:00:00 2001 From: Bjorn Lu Date: Wed, 15 Nov 2023 22:59:09 +0800 Subject: [PATCH] ci(publish): workaround provenance bug (#14996) --- scripts/publishCI.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/scripts/publishCI.ts b/scripts/publishCI.ts index 5f40df369374b0..7668807bd14ef0 100644 --- a/scripts/publishCI.ts +++ b/scripts/publishCI.ts @@ -1,3 +1,8 @@ import { publish } from '@vitejs/release-scripts' -publish({ defaultPackage: 'vite', provenance: true, packageManager: 'pnpm' }) +// Check the tag passed in CI, and skip provenance if tag has `@` due to +// https://github.com/slsa-framework/slsa-github-generator/pull/2758 not released +const tag = process.argv.slice(2)[0] ?? '' +const provenance = !tag.includes('@') + +publish({ defaultPackage: 'vite', provenance, packageManager: 'pnpm' })