Skip to content

Commit

Permalink
feat: add release notes to output
Browse files Browse the repository at this point in the history
  • Loading branch information
mrtnvh committed Mar 15, 2020
1 parent 9786c42 commit a56320d
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 2 deletions.
1 change: 1 addition & 0 deletions .github/workflows/testRelease.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,5 @@ jobs:
echo ${{ steps.semantic.outputs.new_release_major_version }}
echo ${{ steps.semantic.outputs.new_release_minor_version }}
echo ${{ steps.semantic.outputs.new_release_patch_version }}
echo ${{ steps.semantic.outputs.new_release_notes }}
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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_minor_version`: Minor 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

Expand Down
2 changes: 2 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ outputs:
description: 'Minor version of the new release'
new_release_patch_version:
description: 'Patch version of the new release'
new_release_notes:
description: 'The release notes for the new release.'
runs:
using: 'node12'
main: 'index.js'
3 changes: 2 additions & 1 deletion src/outputs.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@
"new_release_version": "new_release_version",
"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_patch_version": "new_release_patch_version",
"new_release_notes": "new_release_notes"
}
3 changes: 2 additions & 1 deletion src/windUpJob.task.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ module.exports = async (result) => {
core.debug(`The release was published with plugin "${release.pluginName}".`);
}

const {version} = nextRelease;
const {version, notes} = nextRelease;
const [major, minor, patch] = version.split('.');

// set outputs
Expand All @@ -33,4 +33,5 @@ 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_notes, notes);
};

0 comments on commit a56320d

Please sign in to comment.