Promise was checked before resolving, so the first early return never happened (Promises are truthy) and the subsequent `if (lastRelease.version)` check produced an error in some cases(`lastRelease` undefined, "Error: TypeError: Cannot read properties of undefined (reading 'version')").
Observed for semantic-release-action 4.2.2 and 5.0.0 with semantic_version > 24.2.6 (not observed with 24.2.6).
The PR prevents reading properties of "undefined".