From 311c0bb5eed63a88ff154b0d539d1d76fd76e112 Mon Sep 17 00:00:00 2001 From: Ettore Di Giacinto Date: Wed, 5 Mar 2025 22:19:13 +0100 Subject: [PATCH] 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 0000000..ea229bc --- /dev/null +++ b/.goreleaser.yml @@ -0,0 +1,40 @@ +# Make sure to check the documentation at http://goreleaser.com +version: 2 +builds: + - main: ./ + id: "localagent" + binary: localagent + ldflags: + - -w -s + # - -X github.com/internal.Version={{.Tag}} + # - -X github.com/internal.Commit={{.Commit}} + env: + - CGO_ENABLED=0 + goos: + - linux + - windows + - darwin + - freebsd + goarch: + - amd64 + - arm + - arm64 +source: + enabled: true + name_template: '{{ .ProjectName }}-{{ .Tag }}-source' +archives: + # Default template uses underscores instead of - + - name_template: >- + {{ .ProjectName }}-{{ .Tag }}- + {{- if eq .Os "freebsd" }}FreeBSD + {{- else }}{{- title .Os }}{{end}}- + {{- if eq .Arch "amd64" }}x86_64 + {{- else if eq .Arch "386" }}i386 + {{- else }}{{ .Arch }}{{end}} + {{- if .Arm }}v{{ .Arm }}{{ end }} +checksum: + name_template: '{{ .ProjectName }}-{{ .Tag }}-checksums.txt' +snapshot: + name_template: "{{ .Tag }}-next" +changelog: + use: github-native \ No newline at end of file