Skip to content

Commit

Permalink
feat: add release notes outputs
Browse files Browse the repository at this point in the history
  • Loading branch information
codfish committed Mar 17, 2021
1 parent 25bc1a7 commit 51b329d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,7 @@ might be so this is a way to cover more cases.
| release-major | The new releases' major version number, i.e. `1` |
| release-minor | The new releases' minor version number, i.e. `8` |
| release-patch | The new releases' patch version number, i.e. `3` |
| release-notes | The release notes of the next release. |

**Environment Variables**:

Expand All @@ -265,6 +266,7 @@ might be so this is a way to cover more cases.
| RELEASE_MAJOR | The new releases' major version number, i.e. `1` |
| RELEASE_MINOR | The new releases' minor version number, i.e. `8` |
| RELEASE_PATCH | The new releases' patch version number, i.e. `3` |
| RELEASE_NOTES | The release notes of the next release in markdown. |

## Maintenance

Expand Down
4 changes: 3 additions & 1 deletion entrypoint.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,18 +75,20 @@ async function run() {
}

// set outputs
const { version } = nextRelease;
const { version, notes } = nextRelease;
const [major, minor, patch] = version.split('.');
core.exportVariable('NEW_RELEASE_PUBLISHED', 'true');
core.exportVariable('RELEASE_VERSION', version);
core.exportVariable('RELEASE_MAJOR', major);
core.exportVariable('RELEASE_MINOR', minor);
core.exportVariable('RELEASE_PATCH', patch);
core.exportVariable('RELEASE_NOTES', notes);
core.setOutput('new-release-published', 'true');
core.setOutput('release-version', version);
core.setOutput('release-major', major);
core.setOutput('release-minor', minor);
core.setOutput('release-patch', patch);
core.setOutput('release-notes', notes);
}

run().catch(core.setFailed);

0 comments on commit 51b329d

Please sign in to comment.