Search for existing draft releases by name, not by tag

The tag is typically (or maybe even always) empty for the draft
releases and can't be really used, while the release name will normally
be unique, so use it as the key.
This commit is contained in:
Vadim Zeitlin 2022-09-04 17:14:22 +02:00
parent bdee2a89b1
commit 9414f126fb
2 changed files with 4 additions and 2 deletions

2
dist/index.js vendored

File diff suppressed because one or more lines are too long

View file

@ -206,7 +206,9 @@ export const release = async (
owner, owner,
repo, repo,
})) { })) {
let release = response.data.find((release) => release.tag_name === tag); let release = response.data.find(
(release) => release.name === config.input_name
);
if (release) { if (release) {
return release; return release;
} }