Skip to content

Commit f8175c6

Browse files
author
heiko.rothe
committed
feat: add output for last release version
E.g. helpful to use in CI pipelines where versions are not committed to the repository.
1 parent d309c4a commit f8175c6

File tree

3 files changed

+4
-1
lines changed

3 files changed

+4
-1
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,7 @@ steps:
216216
| new_release_patch_version | Patch version of the new release. (e.g. `0`) |
217217
| new_release_channel | The distribution channel on which the last release was initially made available (undefined for the default distribution channel). |
218218
| new_release_notes | The release notes for the new release. |
219+
| last_release_version | Version of the previous release, if there was one. (e.g. `1.2.0`) |
219220

220221
#### Using Output Variables:
221222
```yaml

src/outputs.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,6 @@
55
"new_release_minor_version": "new_release_minor_version",
66
"new_release_patch_version": "new_release_patch_version",
77
"new_release_channel": "new_release_channel",
8-
"new_release_notes": "new_release_notes"
8+
"new_release_notes": "new_release_notes",
9+
"last_release_version": "last_release_version"
910
}

src/windUpJob.task.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,4 +40,5 @@ module.exports = async (result) => {
4040
core.setOutput(outputs.new_release_patch_version, patch);
4141
core.setOutput(outputs.new_release_channel, channel);
4242
core.setOutput(outputs.new_release_notes, notes);
43+
core.setOutput(outputs.last_release_version, lastRelease.version)
4344
};

0 commit comments

Comments
 (0)