Make latest release always draft
Some checks reported errors
continuous-integration/drone/push Build encountered an error

This commit is contained in:
Anton Zadvorny 2020-05-08 13:25:38 +03:00
parent e2e8f54ab4
commit 0689dc6bb6

View File

@ -130,12 +130,17 @@ func (p Plugin) Exec() error {
tag = strings.TrimPrefix(p.Commit.Ref, "refs/tags/") tag = strings.TrimPrefix(p.Commit.Ref, "refs/tags/")
} }
draft := p.Config.Draft
if p.Build.Event != "tag" {
draft = true
}
rc := releaseClient{ rc := releaseClient{
Client: client, Client: client,
Owner: p.Repo.Owner, Owner: p.Repo.Owner,
Repo: p.Repo.Name, Repo: p.Repo.Name,
Tag: tag, Tag: tag,
Draft: p.Config.Draft, Draft: draft,
Prerelease: p.Config.PreRelease, Prerelease: p.Config.PreRelease,
FileExists: p.Config.FileExists, FileExists: p.Config.FileExists,
Title: p.Config.Title, Title: p.Config.Title,