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

feat: Add prerelease option

Add an config option to `release` section to set a release at not ready
for production.

Closes #384
This commit is contained in:
Jorin Vogel
2017-10-05 15:47:29 +02:00
parent eb5ce31b37
commit db7af5388d
4 changed files with 19 additions and 13 deletions

View File

@ -84,10 +84,11 @@ func (c *githubClient) CreateFile(
func (c *githubClient) CreateRelease(ctx *context.Context, body string) (releaseID int, err error) {
var release *github.RepositoryRelease
var data = &github.RepositoryRelease{
Name: github.String(ctx.Git.CurrentTag),
TagName: github.String(ctx.Git.CurrentTag),
Body: github.String(body),
Draft: github.Bool(ctx.Config.Release.Draft),
Name: github.String(ctx.Git.CurrentTag),
TagName: github.String(ctx.Git.CurrentTag),
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,