From 95bba02211a2b88426826ff36a3fd1b424a1d5a7 Mon Sep 17 00:00:00 2001 From: Carlos Alexandro Becker Date: Sun, 21 Aug 2022 15:52:10 -0300 Subject: [PATCH] feat: delay github tag creation (#3330) closes #3044 What happens is that, if the tag is created only locally, it'll create the tag in the remote upon creating the release. The tag still needs to be created locally though! @bep let me know if that works for you. Signed-off-by: Carlos A Becker --- internal/client/github.go | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/internal/client/github.go b/internal/client/github.go index 415b2676d1e..6a724e1dcad 100644 --- a/internal/client/github.go +++ b/internal/client/github.go @@ -217,11 +217,12 @@ func (c *githubClient) CreateRelease(ctx *context.Context, body string) (string, body = truncateReleaseBody(body) data := &github.RepositoryRelease{ - Name: github.String(title), - TagName: github.String(ctx.Git.CurrentTag), - Body: github.String(body), - Draft: github.Bool(ctx.Config.Release.Draft), - Prerelease: github.Bool(ctx.PreRelease), + Name: github.String(title), + TagName: github.String(ctx.Git.CurrentTag), + TargetCommitish: github.String(ctx.Git.Commit), + Body: github.String(body), + Draft: github.Bool(ctx.Config.Release.Draft), + Prerelease: github.Bool(ctx.PreRelease), } if ctx.Config.Release.DiscussionCategoryName != "" { data.DiscussionCategoryName = github.String(ctx.Config.Release.DiscussionCategoryName)