mirror of
https://github.com/cycjimmy/semantic-release-action.git
synced 2025-11-07 10:46:56 +00:00
21 lines
606 B
JavaScript
21 lines
606 B
JavaScript
const path = require('path');
|
|
const core = require('@actions/core');
|
|
const exec = require('./_exec');
|
|
const inputs = require('./inputs.json');
|
|
|
|
/**
|
|
* Install Specifying Version semantic-release
|
|
* @returns {Promise<void>}
|
|
*/
|
|
module.exports = async () => {
|
|
const semantic_version = core.getInput(inputs.semantic_version);
|
|
const versionSuffix = semantic_version
|
|
? `@${semantic_version}`
|
|
: '';
|
|
|
|
const {stdout, stderr} = await exec(`npm install semantic-release${versionSuffix} --no-audit --silent`, {
|
|
cwd: path.resolve(__dirname, '..')
|
|
});
|
|
core.debug(stdout);
|
|
core.error(stderr);
|
|
};
|