diff --git a/README.md b/README.md index c86f6c8b..d58b0f1d 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/src/outputs.json b/src/outputs.json index 5666d43b..0c3703dd 100644 --- a/src/outputs.json +++ b/src/outputs.json @@ -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" } diff --git a/src/windUpJob.task.js b/src/windUpJob.task.js index 3133b130..ae31d275 100644 --- a/src/windUpJob.task.js +++ b/src/windUpJob.task.js @@ -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) };