mirror of
https://github.com/cycjimmy/semantic-release-action.git
synced 2025-11-07 10:46:56 +00:00
fix(.npmrc): clean up .npmrc file in the repo after releasing
Issue: "Failed to replace env in config: ${NPM_TOKEN}" after release #2
solution:https://github.com/semantic-release/semantic-release/issues/974#issuecomment-546577677
This commit is contained in:
parent
602ea31215
commit
a0ef86eea3
1 changed files with 11 additions and 0 deletions
11
src/index.js
11
src/index.js
|
|
@ -60,6 +60,17 @@ const release = async () => {
|
|||
...(handleDryRunOption()),
|
||||
});
|
||||
|
||||
// Clean up `.npmrc` file in the repo after releasing
|
||||
{
|
||||
const {stdout, stderr} = await exec(`rm -f .npmrc`, {
|
||||
cwd: path.resolve(__dirname)
|
||||
});
|
||||
core.debug(stdout);
|
||||
if (stderr) {
|
||||
core.debug(stderr);
|
||||
}
|
||||
}
|
||||
|
||||
if (!result) {
|
||||
core.debug('No release published.');
|
||||
return;
|
||||
|
|
|
|||
Loading…
Reference in a new issue