Make goreleaser release fips binaries (#756)

This commit is contained in:
Itxaka 2025-04-11 15:59:01 +02:00 committed by GitHub
parent 80d6f064c3
commit ad825b1308
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1,8 +1,8 @@
# Make sure to check the documentation at http://goreleaser.com # Make sure to check the documentation at http://goreleaser.com
project_name: kairos-agent version: 2
builds: builds:
- ldflags: - ldflags:
- -w -s -X "github.com/kairos-io/kairos-agent/v2/internal/common.VERSION={{.Tag}}" - -w -s -X "github.com/kairos-io/kairos-agent/v2/internal/common.VERSION={{.Tag}}" -X "github.com/kairos-io/kairos-agent/v2/internal/common.gitCommit={{.Commit}}"
env: env:
- CGO_ENABLED=0 - CGO_ENABLED=0
goos: goos:
@ -11,17 +11,47 @@ builds:
- amd64 - amd64
- arm64 - arm64
binary: '{{ .ProjectName }}' binary: '{{ .ProjectName }}'
id: default
- ldflags:
- -w -s -X "github.com/kairos-io/kairos-agent/v2/internal/common.VERSION={{.Tag}}" -X "github.com/kairos-io/kairos-agent/v2/internal/common.gitCommit={{.Commit}}"
env:
- CGO_ENABLED=1
- GOEXPERIMENT=boringcrypto
goos:
- linux
goarch:
- amd64
binary: '{{ .ProjectName }}'
id: fips-amd64
- ldflags:
- -w -s -X "github.com/kairos-io/kairos-agent/v2/internal/common.VERSION={{.Tag}}" -X "github.com/kairos-io/kairos-agent/v2/internal/common.gitCommit={{.Commit}}"
env:
- CGO_ENABLED=1
- GOEXPERIMENT=boringcrypto
- CC=aarch64-linux-gnu-gcc
goos:
- linux
goarch:
- arm64
binary: '{{ .ProjectName }}'
id: fips-arm64
source: source:
enabled: true enabled: true
name_template: '{{ .ProjectName }}-{{ .Tag }}-source' name_template: '{{ .ProjectName }}-{{ .Tag }}-source'
archives: archives:
# Default template uses underscores instead of - - id: default-archive
- name_template: >- ids:
{{ .ProjectName }}-{{ .Tag }}-{{- title .Os }}-{{- if eq .Arch "amd64" }}x86_64{{- else if eq .Arch "386" }}i386{{- else }}{{ .Arch }}{{ end }}{{- if .Arm }}v{{ .Arm }}{{ end }} - default
name_template: '{{ .ProjectName }}-{{ .Version }}-{{ .Os }}-{{ .Arch }}{{ with .Arm }}v{{ . }}{{ end }}{{ with .Mips }}-{{ . }}{{ end }}{{ if not (eq .Amd64 "v1") }}{{ .Amd64 }}{{ end }}'
- id: fips-archive
ids:
- fips-arm64
- fips-amd64
name_template: '{{ .ProjectName }}-{{ .Version }}-{{ .Os }}-{{ .Arch }}{{ with .Arm }}v{{ . }}{{ end }}{{ with .Mips }}-{{ . }}{{ end }}{{ if not (eq .Amd64 "v1") }}{{ .Amd64 }}{{ end }}-fips'
checksum: checksum:
name_template: '{{ .ProjectName }}-{{ .Tag }}-checksums.txt' name_template: '{{ .ProjectName }}-{{ .Tag }}-checksums.txt'
snapshot: snapshot:
name_template: "{{ .Tag }}-next" version_template: "{{ .Tag }}-next"
changelog: changelog:
sort: asc sort: asc
filters: filters: