mirror of
https://github.com/cycjimmy/semantic-release-action.git
synced 2026-04-08 00:10:03 +00:00
refactor(*): split tasks and modules
This commit is contained in:
parent
9d624df62a
commit
feb118b68d
7 changed files with 123 additions and 82 deletions
21
src/handleOptions.js
Normal file
21
src/handleOptions.js
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
const core = require('@actions/core');
|
||||
const inputs = require('./inputs.json');
|
||||
|
||||
/**
|
||||
* handleDryRunOption
|
||||
* @returns {{}|{dryRun: boolean}}
|
||||
*/
|
||||
exports.handleDryRunOption = () => {
|
||||
const dryRun = core.getInput(inputs.dry_run, {required: false}) || '';
|
||||
|
||||
switch (dryRun) {
|
||||
case 'true':
|
||||
return {dryRun: true};
|
||||
|
||||
case 'false':
|
||||
return {dryRun: false};
|
||||
|
||||
default:
|
||||
return {};
|
||||
}
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue