Skip to content

Commit

Permalink
revert: unneeded release update
Browse files Browse the repository at this point in the history
refs #3541
refs #3547

Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
  • Loading branch information
caarlos0 committed Nov 18, 2022
1 parent 9fa3438 commit 78fa66a
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions internal/client/github.go
Expand Up @@ -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
}

Expand Down

0 comments on commit 78fa66a

Please sign in to comment.