Skip to content

Commit

Permalink
feat: add output for last release version
Browse files Browse the repository at this point in the history
E.g. helpful to use in CI pipelines where versions are not committed to
the repository.
  • Loading branch information
heiko.rothe committed Oct 14, 2021
1 parent d309c4a commit f8175c6
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,7 @@ steps:
| 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. |
| last_release_version | Version of the previous release, if there was one. (e.g. `1.2.0`) |

#### Using Output Variables:
```yaml
Expand Down
3 changes: 2 additions & 1 deletion src/outputs.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@
"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"
"new_release_notes": "new_release_notes",
"last_release_version": "last_release_version"
}
1 change: 1 addition & 0 deletions src/windUpJob.task.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,5 @@ module.exports = async (result) => {
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.last_release_version, lastRelease.version)
};

0 comments on commit f8175c6

Please sign in to comment.