diff --git a/.goreleaser.yml b/.goreleaser.yml index a5fb29dbed..0afc3d3d17 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -26,9 +26,13 @@ archives: - format: tar.gz name_template: >- {{- .Binary }}_ - {{- if .IsSnapshot }}{{ .ShortCommit }} - {{- else }}{{ .Version }} - {{ end }} + {{- with index .Env "RELEASE_VERSION" -}} + {{ . }} + {{- else -}} + {{- if .IsSnapshot }}{{ .ShortCommit }} + {{- else }}{{ .Version }} + {{- end }} + {{- end -}} {{- with index .Env "DIRTY_SUFFIX" -}} {{ . }} {{- end -}}_ @@ -52,9 +56,13 @@ archives: checksum: name_template: >- {{ .ProjectName }}_ - {{- if .IsSnapshot }}{{ .ShortCommit }} - {{- else }}{{ .Version }} - {{- end }} + {{- with index .Env "RELEASE_VERSION" -}} + {{ . }} + {{- else -}} + {{- if .IsSnapshot }}{{ .ShortCommit }} + {{- else }}{{ .Version }} + {{- end }} + {{- end -}} {{- with index .Env "DIRTY_SUFFIX" -}} {{ . }} {{- end -}}