5
0
Fork 0
mirror of https://github.com/cycjimmy/semantic-release-action.git synced 2025-11-07 10:46:56 +00:00

fix: fix a type error when nextRelease is undefined

This commit is contained in:
Geoffrey.C 2020-11-16 10:46:38 +08:00
parent 700d706080
commit f1ae39a58a

View file

@ -14,6 +14,11 @@ module.exports = async (result) => {
const {lastRelease, commits, nextRelease, releases} = result; const {lastRelease, commits, nextRelease, releases} = result;
if (!nextRelease) {
core.debug('No release published.');
return Promise.resolve();
}
core.debug(`Published ${nextRelease.type} release version ${nextRelease.version} containing ${commits.length} commits.`); core.debug(`Published ${nextRelease.type} release version ${nextRelease.version} containing ${commits.length} commits.`);
if (lastRelease.version) { if (lastRelease.version) {