From 3164854a75bf3db0d545885601a10b2296439af0 Mon Sep 17 00:00:00 2001 From: Daniel Roe Date: Mon, 3 Jul 2023 14:08:17 +0000 Subject: [PATCH] fix: allow disabling provenance in CI --- src/publish.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/publish.ts b/src/publish.ts index 27d78ca..57c7c0c 100644 --- a/src/publish.ts +++ b/src/publish.ts @@ -1,4 +1,4 @@ -import { isCI } from "std-env"; +import { isCI, provider } from "std-env"; import { ChangelogConfig } from "./config"; import { execCommand } from "./exec"; @@ -10,7 +10,11 @@ export async function publishNpmPackage(config: ChangelogConfig) { args.push("--tag", config.edgeTag ?? "edge"); } - if (isCI) { + if ( + isCI && + provider === "github_actions" && + process.env.NPM_CONFIG_PROVENANCE !== "false" + ) { args.push("--provenance"); }