From 0a34b83353a695f98e5f0c5d7f4f2031eab0961d Mon Sep 17 00:00:00 2001 From: Valentin Kiselev Date: Sat, 21 Dec 2024 12:15:09 +0300 Subject: [PATCH] ci: add linux aarch64 binary to release --- .goreleaser.yml | 31 +++++++++++++++++++++++++++++-- 1 file changed, 29 insertions(+), 2 deletions(-) diff --git a/.goreleaser.yml b/.goreleaser.yml index b24437fb..5ec7135c 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -62,13 +62,25 @@ builds: ldflags: - -s -w -X github.com/evilmartians/lefthook/internal/version.commit={{.Commit}} + - id: lefthook-linux-aarch64 + env: + - CGO_ENABLED=0 + goos: + - linux + goarch: + - arm64 + flags: + - -trimpath + ldflags: + - -s -w -X github.com/evilmartians/lefthook/internal/version.commit={{.Commit}} + archives: - id: lefthook format: binary builds: - lefthook files: - - none* + - none* name_template: >- {{ .ProjectName }}_ {{- .Version }}_ @@ -78,6 +90,22 @@ archives: {{- else if eq .Arch "386" }}i386 {{- else }}{{ .Arch }}{{ end }} + - id: lefthook-linux-aarch64 + format: binary + builds: + - lefthook-linux-aarch64 + files: + - none* + name_template: >- + {{ .ProjectName }}_ + {{- .Version }}_ + {{- if eq .Os "darwin" }}MacOS + {{- else }}{{ title .Os }}{{ end }}_ + {{- if eq .Arch "amd64" }}x86_64 + {{- else if eq .Arch "386" }}i386 + {{- else if eq .Arch "arm64" }}aarch64 + {{- else }}{{ .Arch }}{{ end }} + - id: lefthook-gz format: gz builds: @@ -93,7 +121,6 @@ archives: {{- else if eq .Arch "386" }}i386 {{- else }}{{ .Arch }}{{ end }} - source: enabled: true name_template: "{{ .ProjectName }}_source"