From 7a9d699043a710b99dfa8a146c9c6f2fe161eb71 Mon Sep 17 00:00:00 2001 From: koolay Date: Tue, 19 Oct 2021 19:45:17 +0800 Subject: [PATCH] feat: Add goreleaser --- .goreleaser.yml | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 .goreleaser.yml diff --git a/.goreleaser.yml b/.goreleaser.yml new file mode 100644 index 00000000..546656a1 --- /dev/null +++ b/.goreleaser.yml @@ -0,0 +1,40 @@ +# This is an example .goreleaser.yml file with some sane defaults. +# Make sure to check the documentation at http://goreleaser.com +before: + hooks: + # You may remove this if you don't use go modules. + - go mod tidy +builds: + - env: + - CGO_ENABLED=0 + + main: ./cmd/wire + goos: + - linux + - windows + - darwin + goarch: + - amd64 + - arm64 + mod_timestamp: '{{ .CommitTimestamp }}' + flags: + - -trimpath + - -a + ldflags: + - -s -w -extldflags '-static' + +archives: + - name_template: '{{ .ProjectName }}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}' + replacements: + darwin: Darwin + linux: Linux + windows: Windows + amd64: x86_64 + format_overrides: + - goos: windows + format: zip + files: + - README.md + +checksum: + name_template: '{{ .ProjectName }}_checksums.txt'