Skip to content

Commit

Permalink
fix: set last_release_version output even if no release has been publ…
Browse files Browse the repository at this point in the history
…ished
  • Loading branch information
BirdDev committed Aug 22, 2022
1 parent 3ad3c5e commit b1467cd
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/windUpJob.task.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,18 @@ module.exports = async (result) => {

const {lastRelease, commits, nextRelease, releases} = result;

if (lastRelease.version) {
core.debug(`The last release was "${lastRelease.version}".`);
core.setOutput(outputs.last_release_version, lastRelease.version)
}

if (!nextRelease) {
core.debug('No release published.');
return Promise.resolve();
}

core.debug(`Published ${nextRelease.type} release version ${nextRelease.version} containing ${commits.length} commits.`);

if (lastRelease.version) {
core.debug(`The last release was "${lastRelease.version}".`);
}

for (const release of releases) {
core.debug(`The release was published with plugin "${release.pluginName}".`);
}
Expand All @@ -40,5 +41,4 @@ 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 b1467cd

Please sign in to comment.