1
0
mirror of https://github.com/goreleaser/goreleaser.git synced 2025-03-17 20:47:50 +02:00

revert: unneeded release update

refs #3541
refs #3547

Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
This commit is contained in:
Carlos A Becker 2022-11-17 23:57:28 -03:00
parent 9fa34380ea
commit 78fa66ac7e
No known key found for this signature in database
GPG Key ID: E61E2F7DC14AB940

View File

@ -241,15 +241,6 @@ func (c *githubClient) CreateRelease(ctx *context.Context, body string) (string,
return "", fmt.Errorf("could not release: %w", err)
}
if release.GetDraft() != ctx.Config.Release.Draft {
// sometimes, for unknown reasons, the release is created as a draft, even though it isn't.
// This should publish it.
release.Draft = github.Bool(ctx.Config.Release.Draft)
if _, err := c.updateRelease(ctx, release.GetID(), release); err != nil {
return "", fmt.Errorf("could not update existing release: %w", err)
}
}
return strconv.FormatInt(release.GetID(), 10), nil
}