5
0
Fork 0
mirror of https://github.com/cycjimmy/semantic-release-action.git synced 2025-11-07 18:56:56 +00:00

fix(cleanupNpmrc.task.js): Use @actions/io to remove .npmrc

This commit is contained in:
densogiaichned 2025-07-04 14:23:59 +02:00
parent 8333fcccaa
commit b7db0cbbf5
No known key found for this signature in database
3 changed files with 4 additions and 8 deletions

1
package-lock.json generated
View file

@ -10,6 +10,7 @@
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@actions/core": "^1.10.1", "@actions/core": "^1.10.1",
"@actions/io": "^1.1.3",
"@cycjimmy/awesome-js-funcs": "^4.0.9", "@cycjimmy/awesome-js-funcs": "^4.0.9",
"@semantic-release/changelog": "^6.0.3", "@semantic-release/changelog": "^6.0.3",
"@semantic-release/git": "^10.0.1", "@semantic-release/git": "^10.0.1",

View file

@ -22,6 +22,7 @@
"homepage": "https://github.com/cycjimmy/semantic-release-action#readme", "homepage": "https://github.com/cycjimmy/semantic-release-action#readme",
"dependencies": { "dependencies": {
"@actions/core": "^1.10.1", "@actions/core": "^1.10.1",
"@actions/io": "^1.1.3",
"@cycjimmy/awesome-js-funcs": "^4.0.9", "@cycjimmy/awesome-js-funcs": "^4.0.9",
"@semantic-release/changelog": "^6.0.3", "@semantic-release/changelog": "^6.0.3",
"@semantic-release/git": "^10.0.1", "@semantic-release/git": "^10.0.1",

View file

@ -1,15 +1,9 @@
const core = require('@actions/core'); const io = require('@actions/io');
const exec = require('./_exec');
/** /**
* Clean up `.npmrc` file in the repo after releasing * Clean up `.npmrc` file in the repo after releasing
* @returns {Promise<never>} * @returns {Promise<never>}
*/ */
module.exports = async () => { module.exports = async () => {
const {stdout, stderr} = await exec(`rm -f .npmrc`); await io.rmRF('.npmrc');
core.debug(stdout);
if (stderr) {
return Promise.reject(stderr);
}
}; };