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

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 <caarlos0@users.noreply.github.com>
This commit is contained in:
Carlos Alexandro Becker 2022-08-21 15:52:10 -03:00 committed by GitHub
parent ffb31b46f6
commit 95bba02211
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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)