Skip to content
Permalink
Browse files
revert: unneeded release update
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 78fa66ac7ed85adebf3add4ca7ecb3d5691f8437
Showing 1 changed file with 0 additions and 9 deletions.
@@ -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
}

0 comments on commit 78fa66a

Please sign in to comment.