From f8bc2c309248621a53f71a2e19650742fe7ccc20 Mon Sep 17 00:00:00 2001 From: Valentin Kiselev Date: Mon, 23 Dec 2024 18:02:34 +0300 Subject: [PATCH] ci: add linux aarch64 binary to release (#903) --- .goreleaser.yml | 30 +++++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/.goreleaser.yml b/.goreleaser.yml index 43076370..6f578eb8 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -62,13 +62,40 @@ 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 }}_ + {{- if eq .Os "darwin" }}MacOS + {{- else }}{{ title .Os }}{{ end }}_ + {{- if eq .Arch "amd64" }}x86_64 + {{- 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 }}_ @@ -76,6 +103,7 @@ archives: {{- 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