Skip to content
This repository has been archived by the owner on Aug 7, 2021. It is now read-only.

Commit

Permalink
🐛 Don't publish if token is available
Browse files Browse the repository at this point in the history
  • Loading branch information
AnandChowdhary committed Sep 25, 2020
1 parent 5903f68 commit 0f555c3
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions config/release.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,12 @@ const options: Options = {
changelogFile: "CHANGELOG.md",
},
],
[
"@semantic-release/npm",
{
npmPublish: !!process.env.NPM_TOKEN,
},
],
[
"@semantic-release/git",
{
Expand All @@ -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"],
Expand Down

0 comments on commit 0f555c3

Please sign in to comment.