mirror of
https://github.com/cycjimmy/semantic-release-action.git
synced 2025-11-07 10:46:56 +00:00
feat(outputs): add new_release_channel
This commit is contained in:
parent
606b318c9c
commit
ae40dc6658
6 changed files with 10 additions and 2 deletions
4
.github/workflows/release.yml
vendored
4
.github/workflows/release.yml
vendored
|
|
@ -7,6 +7,10 @@ on:
|
|||
push:
|
||||
branches:
|
||||
- master
|
||||
- next
|
||||
- next-major
|
||||
- alpha
|
||||
- beta
|
||||
|
||||
jobs:
|
||||
release:
|
||||
|
|
|
|||
1
.github/workflows/testRelease.yml
vendored
1
.github/workflows/testRelease.yml
vendored
|
|
@ -6,7 +6,6 @@ on:
|
|||
- master
|
||||
- next
|
||||
- next-major
|
||||
- next-major
|
||||
- alpha
|
||||
- beta
|
||||
- 'feat/**'
|
||||
|
|
|
|||
|
|
@ -200,6 +200,7 @@ steps:
|
|||
| new_release_major_version | Major version of the new release. (e.g. `1`) |
|
||||
| new_release_minor_version | Minor version of the new release. (e.g. `3`) |
|
||||
| new_release_patch_version | Patch version of the new release. (e.g. `0`) |
|
||||
| new_release_channel | The distribution channel on which the last release was initially made available (undefined for the default distribution channel). |
|
||||
| new_release_notes | The release notes for the new release. |
|
||||
|
||||
#### Using Output Variables:
|
||||
|
|
|
|||
|
|
@ -34,6 +34,8 @@ outputs:
|
|||
description: 'Minor version of the new release'
|
||||
new_release_patch_version:
|
||||
description: 'Patch version of the new release'
|
||||
new_release_channel:
|
||||
description: 'The distribution channel on which the last release was initially made available (undefined for the default distribution channel).'
|
||||
new_release_notes:
|
||||
description: 'The release notes for the new release.'
|
||||
runs:
|
||||
|
|
|
|||
|
|
@ -4,5 +4,6 @@
|
|||
"new_release_major_version": "new_release_major_version",
|
||||
"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"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ module.exports = async (result) => {
|
|||
core.debug(`The release was published with plugin "${release.pluginName}".`);
|
||||
}
|
||||
|
||||
const {version, notes} = nextRelease;
|
||||
const {version, channel, notes} = nextRelease;
|
||||
const [major, minor, patch] = version.split(/\.|-|\s/g, 3);
|
||||
|
||||
// set outputs
|
||||
|
|
@ -33,5 +33,6 @@ module.exports = async (result) => {
|
|||
core.setOutput(outputs.new_release_major_version, major);
|
||||
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);
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in a new issue