mirror of
https://github.com/cycjimmy/semantic-release-action.git
synced 2025-11-07 10:46:56 +00:00
feat: add release notes to output
This commit is contained in:
parent
9786c4206e
commit
a56320d643
5 changed files with 8 additions and 2 deletions
1
.github/workflows/testRelease.yml
vendored
1
.github/workflows/testRelease.yml
vendored
|
|
@ -36,4 +36,5 @@ jobs:
|
||||||
echo ${{ steps.semantic.outputs.new_release_major_version }}
|
echo ${{ steps.semantic.outputs.new_release_major_version }}
|
||||||
echo ${{ steps.semantic.outputs.new_release_minor_version }}
|
echo ${{ steps.semantic.outputs.new_release_minor_version }}
|
||||||
echo ${{ steps.semantic.outputs.new_release_patch_version }}
|
echo ${{ steps.semantic.outputs.new_release_patch_version }}
|
||||||
|
echo ${{ steps.semantic.outputs.new_release_notes }}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -27,6 +27,7 @@ GitHub Action for [Semantic Release](https://github.com/semantic-release/semanti
|
||||||
* `new_release_major_version`: Major version of the new release
|
* `new_release_major_version`: Major version of the new release
|
||||||
* `new_release_minor_version`: Minor version of the new release
|
* `new_release_minor_version`: Minor version of the new release
|
||||||
* `new_release_patch_version`: Patch version of the new release
|
* `new_release_patch_version`: Patch version of the new release
|
||||||
|
* `new_release_notes`: The release notes for the new release.
|
||||||
|
|
||||||
### Examples
|
### Examples
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -24,6 +24,8 @@ outputs:
|
||||||
description: 'Minor version of the new release'
|
description: 'Minor version of the new release'
|
||||||
new_release_patch_version:
|
new_release_patch_version:
|
||||||
description: 'Patch version of the new release'
|
description: 'Patch version of the new release'
|
||||||
|
new_release_notes:
|
||||||
|
description: 'The release notes for the new release.'
|
||||||
runs:
|
runs:
|
||||||
using: 'node12'
|
using: 'node12'
|
||||||
main: 'index.js'
|
main: 'index.js'
|
||||||
|
|
|
||||||
|
|
@ -3,5 +3,6 @@
|
||||||
"new_release_version": "new_release_version",
|
"new_release_version": "new_release_version",
|
||||||
"new_release_major_version": "new_release_major_version",
|
"new_release_major_version": "new_release_major_version",
|
||||||
"new_release_minor_version": "new_release_minor_version",
|
"new_release_minor_version": "new_release_minor_version",
|
||||||
"new_release_patch_version": "new_release_patch_version"
|
"new_release_patch_version": "new_release_patch_version",
|
||||||
|
"new_release_notes": "new_release_notes"
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,7 @@ module.exports = async (result) => {
|
||||||
core.debug(`The release was published with plugin "${release.pluginName}".`);
|
core.debug(`The release was published with plugin "${release.pluginName}".`);
|
||||||
}
|
}
|
||||||
|
|
||||||
const {version} = nextRelease;
|
const {version, notes} = nextRelease;
|
||||||
const [major, minor, patch] = version.split('.');
|
const [major, minor, patch] = version.split('.');
|
||||||
|
|
||||||
// set outputs
|
// set outputs
|
||||||
|
|
@ -33,4 +33,5 @@ module.exports = async (result) => {
|
||||||
core.setOutput(outputs.new_release_major_version, major);
|
core.setOutput(outputs.new_release_major_version, major);
|
||||||
core.setOutput(outputs.new_release_minor_version, minor);
|
core.setOutput(outputs.new_release_minor_version, minor);
|
||||||
core.setOutput(outputs.new_release_patch_version, patch);
|
core.setOutput(outputs.new_release_patch_version, patch);
|
||||||
|
core.setOutput(outputs.new_release_notes, notes);
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue