mirror of
https://github.com/cycjimmy/semantic-release-action.git
synced 2026-04-07 16:09:24 +00:00
feat: add ci input parameter
This commit is contained in:
parent
9a76e06dfe
commit
b356b18b5f
5 changed files with 44 additions and 0 deletions
|
|
@ -60,6 +60,25 @@ exports.handleDryRunOption = () => {
|
|||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Handle Ci Option
|
||||
* @returns {{}|{ci: boolean}}
|
||||
*/
|
||||
exports.handleCiOption = () => {
|
||||
const ci = core.getInput(inputs.ci);
|
||||
|
||||
switch (ci) {
|
||||
case 'true':
|
||||
return { ci: true, noCi: false };
|
||||
|
||||
case 'false':
|
||||
return { ci: false, noCi: true };
|
||||
|
||||
default:
|
||||
return {};
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Handle Extends Option
|
||||
* @returns {{}|{extends: Array}|{extends: String}}
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ const core = require('@actions/core');
|
|||
const {
|
||||
handleBranchesOption,
|
||||
handleDryRunOption,
|
||||
handleCiOption,
|
||||
handleExtends,
|
||||
} = require('./handleOptions');
|
||||
const setUpJob = require('./setUpJob.task');
|
||||
|
|
@ -28,6 +29,7 @@ const release = async () => {
|
|||
const result = await semanticRelease({
|
||||
...handleBranchesOption(),
|
||||
...handleDryRunOption(),
|
||||
...handleCiOption(),
|
||||
...handleExtends(),
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@
|
|||
"branch": "branch",
|
||||
"extra_plugins": "extra_plugins",
|
||||
"dry_run": "dry_run",
|
||||
"ci": "ci",
|
||||
"extends": "extends",
|
||||
"working_directory": "working_directory"
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue