Merge pull request #153 from 1nVitr0/main

feat: add `ci` input parameter
This commit is contained in:
Geoffrey.C 2023-03-15 10:49:09 +08:00 committed by GitHub
commit 039e6080a2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 44 additions and 0 deletions

View file

@ -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}}

View file

@ -2,6 +2,7 @@ const core = require('@actions/core');
const {
handleBranchesOption,
handleDryRunOption,
handleCiOption,
handleExtends,
handleTagFormat,
} = require('./handleOptions');
@ -29,6 +30,7 @@ const release = async () => {
const result = await semanticRelease({
...handleBranchesOption(),
...handleDryRunOption(),
...handleCiOption(),
...handleExtends(),
...handleTagFormat()
});

View file

@ -4,6 +4,7 @@
"branch": "branch",
"extra_plugins": "extra_plugins",
"dry_run": "dry_run",
"ci": "ci",
"extends": "extends",
"working_directory": "working_directory",
"tag_format": "tag_format"