diff --git a/docs/115-release.md b/docs/115-release.md index 012390d78..fcba99d64 100644 --- a/docs/115-release.md +++ b/docs/115-release.md @@ -24,8 +24,13 @@ release: # Default is false. prerelease: true - # Optional template to name the release - # Default is the version number + # You can change the name of the GitHub release. + # This is parsed with the Go template engine and the following variables + # are available: + # - ProjectName + # - Tag + # - Version (Git tag without `v` prefix) + # Default is `` name_template: "{{.ProjectName}}-v{{.Version}}" ``` diff --git a/pipeline/defaults/defaults.go b/pipeline/defaults/defaults.go index 9dbfce830..044da2e57 100644 --- a/pipeline/defaults/defaults.go +++ b/pipeline/defaults/defaults.go @@ -15,7 +15,7 @@ import ( const NameTemplate = "{{ .Binary }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}" // ReleaseNameTemplate is the default name for the release. -const ReleaseNameTemplate = "{{ .Version }}" +const ReleaseNameTemplate = "{{.Tag}}" // SnapshotNameTemplate represents the default format for snapshot release names. const SnapshotNameTemplate = "SNAPSHOT-{{ .Commit }}"