diff --git a/src/utils.ts b/src/utils.ts index cf09a1c13..8952c345e 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -63,7 +63,11 @@ export function getLatestTag( tagPrefix: string ) { return ( - tags.find((tag) => !prerelease(tag.name.replace(prefixRegex, ''))) || { + tags.find( + (tag) => + prefixRegex.test(tag.name) && + !prerelease(tag.name.replace(prefixRegex, '')) + ) || { name: `${tagPrefix}0.0.0`, commit: { sha: 'HEAD',