Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: improve goreleaser config #552

Merged
merged 2 commits into from
Oct 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 18 additions & 27 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ before:
- go mod tidy

builds:
- id: "hcloud-build"
- id: hcloud-build
main: ./cmd/hcloud/main.go
binary: hcloud
ldflags:
Expand All @@ -18,12 +18,12 @@ builds:
- amd64
- arm
- arm64
- 386
- "386"
goarm:
- 6
- 7
- "6"
- "7"

- id: "hcloud-macos-build"
- id: hcloud-build-darwin
main: ./cmd/hcloud/main.go
binary: hcloud
ldflags:
Expand All @@ -34,46 +34,37 @@ builds:
- darwin
goarch:
- amd64
hooks:
post:
- cmd: gon -log-level DEBUG gon.hcl
output: true
- id: "hcloud-macos-arm-build"
main: ./cmd/hcloud/main.go
binary: hcloud
ldflags:
- -w -X github.com/hetznercloud/cli/internal/version.Version={{.Version}}
env:
- CGO_ENABLED=0
goos:
- darwin
goarch:
- arm64
hooks:
post:
- cmd: gon -log-level DEBUG gon_arm64.hcl
- env:
- GON_SOURCE={{ .Path }}
cmd: gon -log-level=debug gon.hcl
output: true

checksum:
name_template: "checksums.txt"
name_template: checksums.txt
algorithm: sha256

signs:
- artifacts: all
signature: "${artifact}.sig"
signature: ${artifact}.sig
id: hcloud-sign
ids:
- hcloud-build
- hcloud-macos-build
- hcloud-macos-arm-build
args: ["--batch", "-u", "[email protected]", "--pinentry-mode", "loopback", "--output", "${signature}", "--detach-sign", "${artifact}"]
- hcloud-build-darwin
args:
- --batch
- [email protected]
- --pinentry-mode=loopback
- --output=${signature}
- --detach-sign=${artifact}

archives:
- id: hcloud-archive
builds:
- hcloud-build
- hcloud-macos-build
- hcloud-macos-arm-build
- hcloud-build-darwin
name_template: "{{ .Binary }}-{{ .Os }}-{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}"
jooola marked this conversation as resolved.
Show resolved Hide resolved

format_overrides:
Expand Down
2 changes: 1 addition & 1 deletion gon.hcl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
source = ["./dist/hcloud-macos-build_darwin_amd64_v1/hcloud"]
source = ["@env:GON_SOURCE"]
bundle_id = "cloud.hetzner.cli"

apple_id {
Expand Down
11 changes: 0 additions & 11 deletions gon_arm64.hcl

This file was deleted.

Loading