updated goreleaser to fix linux build problems

This commit is contained in:
christophe-duc 2026-01-09 14:43:21 -04:00
parent 4301b44416
commit 964ec400a1
2 changed files with 26 additions and 4 deletions

View file

@ -19,6 +19,10 @@ jobs:
uses: actions/setup-go@v5
with:
go-version: '1.25'
- name: Install build dependencies
run: |
sudo apt-get update
sudo apt-get install -y gcc-aarch64-linux-gnu libc6-dev-arm64-cross
- name: Run goreleaser
uses: goreleaser/goreleaser-action@v6
with:

View file

@ -1,19 +1,36 @@
# This is an example goreleaser.yaml file with some sane defaults.
# Make sure to check the documentation at http://goreleaser.com
env:
- CGO_ENABLED=0
builds:
- id: binary
# macOS builds - CGO disabled (libpod not supported)
- id: darwin
tags:
- containers_image_openpgp
- exclude_graphdriver_btrfs
goos:
- darwin
goarch:
- amd64
- arm64
env:
- CGO_ENABLED=0
ldflags:
- -s -w -X main.version={{.Version}} -X main.commit={{.Commit}} -X main.date={{.Date}} -X main.buildSource=binaryRelease
# Linux builds - CGO enabled (libpod support)
- id: linux
tags:
- containers_image_openpgp
- exclude_graphdriver_btrfs
goos:
- linux
goarch:
- amd64
- arm64
env:
- CGO_ENABLED=1
- >-
{{- if eq .Arch "arm64" }}CC=aarch64-linux-gnu-gcc{{- end }}
ldflags:
- -s -w -X main.version={{.Version}} -X main.commit={{.Commit}} -X main.date={{.Date}} -X main.buildSource=binaryRelease
- id: snap
@ -30,7 +47,8 @@ builds:
archives:
- builds:
- binary
- darwin
- linux
name_template: >-
{{ .ProjectName }}_
{{- if eq .Os "darwin" }}Darwin