1
0
mirror of https://github.com/goreleaser/goreleaser.git synced 2025-01-06 03:13:48 +02:00

fix: draft release when no existing draft release exists

closes #3115
refs #3073

Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
This commit is contained in:
Carlos A Becker 2022-05-20 09:56:24 -03:00
parent e19a0013c5
commit 0b3305999c
No known key found for this signature in database
GPG Key ID: E61E2F7DC14AB940

View File

@ -218,7 +218,7 @@ func (c *githubClient) findDraftRelease(ctx *context.Context) (*github.Repositor
return nil, err
}
for _, r := range releases {
if r.TagName == &ctx.Git.CurrentTag {
if r.GetTagName() == ctx.Git.CurrentTag {
return r, nil
}
}
@ -227,7 +227,7 @@ func (c *githubClient) findDraftRelease(ctx *context.Context) (*github.Repositor
}
opts.Page = resp.NextPage
}
return nil, nil
return nil, fmt.Errorf("no existing draft release found for %s", ctx.Git.CurrentTag)
}
func (c *githubClient) CreateRelease(ctx *context.Context, body string) (string, error) {