Skip to content

Commit

Permalink
fix: publishing to npm
Browse files Browse the repository at this point in the history
  • Loading branch information
juliendargelos committed Dec 15, 2021
1 parent 4f0c5e8 commit 55f352c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
3 changes: 2 additions & 1 deletion dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7110,12 +7110,13 @@ async function semanticRelease(path, release, publish, env = {}) {
], { env });
}
if (publish) {
const npmEnv = await npmConfigRegistry(env.NPM_CONFIG_REGISTRY, env.NPM_TOKEN);
await exec.exec('yarn', [
'publish',
'--non-interactive',
'--no-git-tag-version',
'--access', 'public'
], { env });
], { env: { ...env, ...npmEnv } });
}
}

Expand Down
7 changes: 6 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -186,11 +186,16 @@ async function semanticRelease(
}

if (publish) {
const npmEnv = await npmConfigRegistry(
env.NPM_CONFIG_REGISTRY,
env.NPM_TOKEN
)

await exec.exec('yarn', [
'publish',
'--non-interactive',
'--no-git-tag-version',
'--access', 'public'
], { env })
], { env: { ...env, ...npmEnv } })
}
}

0 comments on commit 55f352c

Please sign in to comment.