5
0
Fork 0
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:
cycjimmy 2019-10-26 15:51:03 +08:00
parent 602ea31215
commit a0ef86eea3

View file

@ -60,6 +60,17 @@ const release = async () => {
...(handleDryRunOption()), ...(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) { if (!result) {
core.debug('No release published.'); core.debug('No release published.');
return; return;