From 15f18fe8eae68ee3af9c59851e3a89adf9e5d9f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A5rten=20Svantesson?= Date: Tue, 4 Jun 2024 01:42:15 +0200 Subject: [PATCH] fix: github now requires explicit make_latest=true on update --- scm/driver/github/release.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scm/driver/github/release.go b/scm/driver/github/release.go index 82b2e350e..b8526aa8a 100644 --- a/scm/driver/github/release.go +++ b/scm/driver/github/release.go @@ -32,6 +32,7 @@ type releaseInput struct { Commitish string `json:"target_commitish,omitempty"` Draft bool `json:"draft"` Prerelease bool `json:"prerelease"` + MakeLatest string `json:"make_latest"` } func (s *releaseService) Find(ctx context.Context, repo string, id int) (*scm.Release, *scm.Response, error) { @@ -97,6 +98,9 @@ func (s *releaseService) Update(ctx context.Context, repo string, id int, input } in.Draft = input.Draft in.Prerelease = input.Prerelease + if !(in.Prerelease || in.Draft) { + in.MakeLatest = "true" + } out := new(release) res, err := s.client.do(ctx, "PATCH", path, in, out) return convertRelease(out), res, err