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:
parent
e19a0013c5
commit
0b3305999c
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user