From 0f555c3455e5fe685bf781bd5e4e509dd4c3d07d Mon Sep 17 00:00:00 2001 From: Anand Chowdhary Date: Fri, 25 Sep 2020 15:52:37 +0530 Subject: [PATCH] :bug: Don't publish if token is available --- config/release.config.ts | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/config/release.config.ts b/config/release.config.ts index 496b7b8..081b4c8 100644 --- a/config/release.config.ts +++ b/config/release.config.ts @@ -55,6 +55,12 @@ const options: Options = { changelogFile: "CHANGELOG.md", }, ], + [ + "@semantic-release/npm", + { + npmPublish: !!process.env.NPM_TOKEN, + }, + ], [ "@semantic-release/git", { @@ -65,10 +71,6 @@ const options: Options = { ], }; -if (process.env.NPM_TOKEN) { - options.plugins = options.plugins?.concat("@semantic-release/npm"); -} - export const master: Options = { ...options, branches: ["master"],