mirror of
https://github.com/goreleaser/goreleaser.git
synced 2025-03-17 20:47:50 +02:00
feat: Create new tags for GitHub release (#643)
I added the target_commitish to the release payload so the tag will be created if it does not already exist. This value will not be used if the tag already exists.
This commit is contained in:
parent
6d791ed721
commit
65ff5b771b
@ -94,11 +94,12 @@ func (c *githubClient) CreateRelease(ctx *context.Context, body string) (int64,
|
||||
return 0, err
|
||||
}
|
||||
var 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.Config.Release.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.Config.Release.Prerelease),
|
||||
}
|
||||
release, _, err = c.client.Repositories.GetReleaseByTag(
|
||||
ctx,
|
||||
|
Loading…
x
Reference in New Issue
Block a user