mirror of
https://github.com/cycjimmy/semantic-release-action.git
synced 2026-04-07 16:09:24 +00:00
feat: added gitHead and gitTag outputs
This commit is contained in:
parent
17e74ffa57
commit
385af4fa1c
4 changed files with 26 additions and 5 deletions
|
|
@ -5,6 +5,10 @@
|
|||
"new_release_minor_version": "new_release_minor_version",
|
||||
"new_release_patch_version": "new_release_patch_version",
|
||||
"new_release_channel": "new_release_channel",
|
||||
"new_release_notes": "new_release_notes",
|
||||
"last_release_version": "last_release_version"
|
||||
"new_release_notes": "new_release_notes",
|
||||
"new_release_git_head": "new_release_git_head",
|
||||
"new_release_git_tag": "new_release_git_tag",
|
||||
"last_release_version": "last_release_version",
|
||||
"last_release_git_head": "last_release_git_head",
|
||||
"last_release_git_tag": "last_release_git_tag"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ module.exports = async (result) => {
|
|||
core.debug(`The release was published with plugin "${release.pluginName}".`);
|
||||
}
|
||||
|
||||
const {version, channel, notes} = nextRelease;
|
||||
const {version, channel, notes, gitHead, gitTag} = nextRelease;
|
||||
const [major, minor, patch] = version.split(/\.|-|\s/g, 3);
|
||||
|
||||
// set outputs
|
||||
|
|
@ -40,5 +40,10 @@ module.exports = async (result) => {
|
|||
core.setOutput(outputs.new_release_minor_version, minor);
|
||||
core.setOutput(outputs.new_release_patch_version, patch);
|
||||
core.setOutput(outputs.new_release_channel, channel);
|
||||
core.setOutput(outputs.new_release_notes, notes);
|
||||
core.setOutput(outputs.new_release_notes, notes);
|
||||
core.setOutput(outputs.new_release_git_head, gitHead);
|
||||
core.setOutput(outputs.new_release_git_tag, gitTag);
|
||||
core.setOutput(outputs.last_release_version, lastRelease.version);
|
||||
core.setOutput(outputs.last_release_git_head, lastRelease.gitHead);
|
||||
core.setOutput(outputs.last_release_git_tag, lastRelease.gitTag);
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue