Rethrow getTag error if not 404

This commit is contained in:
Spikatrix
2023-06-10 03:58:27 +00:00
parent 7670b98fa0
commit 212d4babf8
2 changed files with 10 additions and 2 deletions

View File

@@ -57,7 +57,11 @@ async function get_release_by_tag(
tag_sha: tag
});
core.warning(`Ignoring target_commit as the tag ${tag} already exists`)
} catch { }
} catch (tagError: any) {
if (tagError.status !== 404) {
throw tagError
}
}
}
return await octokit.request(createRelease, {
...repo(),