mirror of
https://github.com/cycjimmy/semantic-release-action.git
synced 2025-11-07 10:46:56 +00:00
feat: support for option tagFormat
This commit is contained in:
parent
9a76e06dfe
commit
ed38eb0e99
3 changed files with 20 additions and 1 deletions
|
|
@ -77,3 +77,19 @@ exports.handleExtends = () => {
|
||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Handle TagFormat Option
|
||||||
|
* @returns {{}|{tagFormat: String}}
|
||||||
|
*/
|
||||||
|
exports.handleTagFormat = () => {
|
||||||
|
const tagFormat = core.getInput(inputs.tagFormat);
|
||||||
|
|
||||||
|
if (tagFormat) {
|
||||||
|
return {
|
||||||
|
tagFormat
|
||||||
|
};
|
||||||
|
} else {
|
||||||
|
return {};
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,7 @@ const {
|
||||||
handleBranchesOption,
|
handleBranchesOption,
|
||||||
handleDryRunOption,
|
handleDryRunOption,
|
||||||
handleExtends,
|
handleExtends,
|
||||||
|
handleTagFormat,
|
||||||
} = require('./handleOptions');
|
} = require('./handleOptions');
|
||||||
const setUpJob = require('./setUpJob.task');
|
const setUpJob = require('./setUpJob.task');
|
||||||
const installSpecifyingVersionSemantic = require('./installSpecifyingVersionSemantic.task');
|
const installSpecifyingVersionSemantic = require('./installSpecifyingVersionSemantic.task');
|
||||||
|
|
@ -29,6 +30,7 @@ const release = async () => {
|
||||||
...handleBranchesOption(),
|
...handleBranchesOption(),
|
||||||
...handleDryRunOption(),
|
...handleDryRunOption(),
|
||||||
...handleExtends(),
|
...handleExtends(),
|
||||||
|
...handleTagFormat()
|
||||||
});
|
});
|
||||||
|
|
||||||
await cleanupNpmrc();
|
await cleanupNpmrc();
|
||||||
|
|
|
||||||
|
|
@ -5,5 +5,6 @@
|
||||||
"extra_plugins": "extra_plugins",
|
"extra_plugins": "extra_plugins",
|
||||||
"dry_run": "dry_run",
|
"dry_run": "dry_run",
|
||||||
"extends": "extends",
|
"extends": "extends",
|
||||||
"working_directory": "working_directory"
|
"working_directory": "working_directory",
|
||||||
|
"tagFormat": "tagFormat"
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue