refactor(*): split tasks and modules

This commit is contained in:
cycjimmy 2019-10-26 19:19:39 +08:00
parent 9d624df62a
commit feb118b68d
7 changed files with 123 additions and 82 deletions

15
src/cleanupNpmrc.task.js Normal file
View file

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