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

Commit 0f555c3

Browse files
🐛 Don't publish if token is available
1 parent 5903f68 commit 0f555c3

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

config/release.config.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,12 @@ const options: Options = {
5555
changelogFile: "CHANGELOG.md",
5656
},
5757
],
58+
[
59+
"@semantic-release/npm",
60+
{
61+
npmPublish: !!process.env.NPM_TOKEN,
62+
},
63+
],
5864
[
5965
"@semantic-release/git",
6066
{
@@ -65,10 +71,6 @@ const options: Options = {
6571
],
6672
};
6773

68-
if (process.env.NPM_TOKEN) {
69-
options.plugins = options.plugins?.concat("@semantic-release/npm");
70-
}
71-
7274
export const master: Options = {
7375
...options,
7476
branches: ["master"],

0 commit comments

Comments
 (0)