From 0cace5396e309e8d575c27dc6028dc759d56686d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Friedrich=20Gro=C3=9Fe?= Date: Tue, 7 Mar 2023 10:48:47 +0100 Subject: [PATCH] Add go-releaser config --- .gitignore | 2 ++ .goreleaser.yaml | 35 +++++++++++++++++++++++++++++++++++ 2 files changed, 37 insertions(+) create mode 100644 .goreleaser.yaml diff --git a/.gitignore b/.gitignore index 485dee6..1d51fec 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,3 @@ .idea + +dist/ diff --git a/.goreleaser.yaml b/.goreleaser.yaml new file mode 100644 index 0000000..de4fd6e --- /dev/null +++ b/.goreleaser.yaml @@ -0,0 +1,35 @@ +before: + hooks: + - go mod tidy +builds: + - env: + - CGO_ENABLED=0 + goos: + - linux + - windows + - darwin + +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 +checksum: + name_template: 'checksums.txt' +snapshot: + name_template: "{{ incpatch .Version }}-next" +changelog: + sort: asc + filters: + exclude: + - '^docs:' + - '^test:'