Skip to content

Commit b7db0cb

Browse files
fix(cleanupNpmrc.task.js): Use @actions/io to remove .npmrc
1 parent 8333fcc commit b7db0cb

File tree

3 files changed

+4
-8
lines changed

3 files changed

+4
-8
lines changed

package-lock.json

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
"homepage": "https://github.com/cycjimmy/semantic-release-action#readme",
2323
"dependencies": {
2424
"@actions/core": "^1.10.1",
25+
"@actions/io": "^1.1.3",
2526
"@cycjimmy/awesome-js-funcs": "^4.0.9",
2627
"@semantic-release/changelog": "^6.0.3",
2728
"@semantic-release/git": "^10.0.1",

src/cleanupNpmrc.task.js

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,9 @@
1-
const core = require('@actions/core');
2-
const exec = require('./_exec');
1+
const io = require('@actions/io');
32

43
/**
54
* Clean up `.npmrc` file in the repo after releasing
65
* @returns {Promise<never>}
76
*/
87
module.exports = async () => {
9-
const {stdout, stderr} = await exec(`rm -f .npmrc`);
10-
core.debug(stdout);
11-
12-
if (stderr) {
13-
return Promise.reject(stderr);
14-
}
8+
await io.rmRF('.npmrc');
159
};

0 commit comments

Comments
 (0)