mirror of
https://github.com/cycjimmy/semantic-release-action.git
synced 2025-11-07 10:46:56 +00:00
Merge pull request #250 from densogiaichned/main
fix(cleanupNpmrc.task.js): Use @actions/io to remove .npmrc
This commit is contained in:
commit
5d996b8178
3 changed files with 4 additions and 8 deletions
1
package-lock.json
generated
1
package-lock.json
generated
|
|
@ -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",
|
||||||
|
|
|
||||||
|
|
@ -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",
|
||||||
|
|
|
||||||
|
|
@ -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);
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue