From 8ab1c786747c7a043a3f91189bfe560e3e8a07b4 Mon Sep 17 00:00:00 2001 From: d3witt Date: Tue, 13 Aug 2024 21:40:48 +0200 Subject: [PATCH] Fix release --- .goreleaser.yaml | 60 +++++++++++++++++++++++++----------------------- 1 file changed, 31 insertions(+), 29 deletions(-) diff --git a/.goreleaser.yaml b/.goreleaser.yaml index f0ff055..d99a25b 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -9,38 +9,40 @@ version: 2 before: - hooks: - # You may remove this if you don't use go modules. - - go mod tidy - # you may remove this if you don't need go generate - - go generate ./... + hooks: + # You may remove this if you don't use go modules. + - go mod tidy + # you may remove this if you don't need go generate + - go generate ./... builds: - - env: - - CGO_ENABLED=0 - goos: - - linux - - windows - - darwin + - env: + - CGO_ENABLED=0 + goos: + - linux + - windows + - darwin + ldflags: + - -s -w -X main.version={{.Version}} archives: - - format: tar.gz - # this name template makes the OS and Arch compatible with the results of `uname`. - name_template: >- - {{ .ProjectName }}_ - {{- title .Os }}_ - {{- if eq .Arch "amd64" }}x86_64 - {{- else if eq .Arch "386" }}i386 - {{- else }}{{ .Arch }}{{ end }} - {{- if .Arm }}v{{ .Arm }}{{ end }} - # use zip for windows archives - format_overrides: - - goos: windows - format: zip + - format: tar.gz + # this name template makes the OS and Arch compatible with the results of `uname`. + name_template: >- + {{ .ProjectName }}_ + {{- title .Os }}_ + {{- if eq .Arch "amd64" }}x86_64 + {{- else if eq .Arch "386" }}i386 + {{- else }}{{ .Arch }}{{ end }} + {{- if .Arm }}v{{ .Arm }}{{ end }} + # use zip for windows archives + format_overrides: + - goos: windows + format: zip changelog: - sort: asc - filters: - exclude: - - "^docs:" - - "^test:" + sort: asc + filters: + exclude: + - "^docs:" + - "^test:"