Skip to content

Commit 55f352c

Browse files
fix: publishing to npm
1 parent 4f0c5e8 commit 55f352c

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

dist/index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7110,12 +7110,13 @@ async function semanticRelease(path, release, publish, env = {}) {
71107110
], { env });
71117111
}
71127112
if (publish) {
7113+
const npmEnv = await npmConfigRegistry(env.NPM_CONFIG_REGISTRY, env.NPM_TOKEN);
71137114
await exec.exec('yarn', [
71147115
'publish',
71157116
'--non-interactive',
71167117
'--no-git-tag-version',
71177118
'--access', 'public'
7118-
], { env });
7119+
], { env: { ...env, ...npmEnv } });
71197120
}
71207121
}
71217122

src/index.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,11 +186,16 @@ async function semanticRelease(
186186
}
187187

188188
if (publish) {
189+
const npmEnv = await npmConfigRegistry(
190+
env.NPM_CONFIG_REGISTRY,
191+
env.NPM_TOKEN
192+
)
193+
189194
await exec.exec('yarn', [
190195
'publish',
191196
'--non-interactive',
192197
'--no-git-tag-version',
193198
'--access', 'public'
194-
], { env })
199+
], { env: { ...env, ...npmEnv } })
195200
}
196201
}

0 commit comments

Comments
 (0)