1
0
mirror of https://github.com/goreleaser/goreleaser.git synced 2025-07-05 00:59:04 +02:00

feat: Add ability to specify release name

Signed-off-by: Matt Stratton <matt.stratton@gmail.com>
This commit is contained in:
Matt Stratton
2017-10-07 04:31:14 -05:00
parent f8ced34079
commit e2ee7c4b2f
6 changed files with 51 additions and 4 deletions

View File

@ -8,6 +8,7 @@ import (
"github.com/apex/log"
"github.com/google/go-github/github"
"github.com/goreleaser/goreleaser/context"
"github.com/goreleaser/goreleaser/internal/name"
"golang.org/x/oauth2"
)
@ -83,8 +84,12 @@ func (c *githubClient) CreateFile(
func (c *githubClient) CreateRelease(ctx *context.Context, body string) (releaseID int, err error) {
var release *github.RepositoryRelease
releaseTitle, err := name.ForTitle(ctx)
if err != nil {
return 0, err
}
var data = &github.RepositoryRelease{
Name: github.String(ctx.Git.CurrentTag),
Name: github.String(releaseTitle),
TagName: github.String(ctx.Git.CurrentTag),
Body: github.String(body),
Draft: github.Bool(ctx.Config.Release.Draft),