From 9f4d8fc7770675acf60dcc01c37bb08b5c0b9a76 Mon Sep 17 00:00:00 2001 From: Lukasz Raczylo Date: Sun, 4 Jan 2026 01:08:55 +0000 Subject: [PATCH] fixup! fixup! perf: build frontend once on runner instead of in Docker --- .goreleaser.yaml | 23 ++++++----------------- 1 file changed, 6 insertions(+), 17 deletions(-) diff --git a/.goreleaser.yaml b/.goreleaser.yaml index 7e057a8..779db4b 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -7,11 +7,8 @@ project_name: gohoarder before: hooks: - go mod tidy - # Download and setup Zig for cross-compilation - - wget -q https://ziglang.org/download/0.13.0/zig-linux-x86_64-0.13.0.tar.xz -O /tmp/zig.tar.xz - - tar -xf /tmp/zig.tar.xz -C /tmp - - sudo cp -r /tmp/zig-linux-x86_64-0.13.0 /usr/local/zig - - sudo ln -sf /usr/local/zig/zig /usr/local/bin/zig + # Download and setup Zig for cross-compilation (Linux only) + - bash -c 'if [ "$(uname -s)" = "Linux" ]; then wget -q https://ziglang.org/download/0.16.0/zig-linux-x86_64-0.16.0.tar.xz -O /tmp/zig.tar.xz && tar -xf /tmp/zig.tar.xz -C /tmp && sudo cp -r /tmp/zig-linux-x86_64-0.16.0 /usr/local/zig && sudo ln -sf /usr/local/zig/zig /usr/local/bin/zig; fi' # Build configuration # All binaries built using Zig for consistent cross-compilation @@ -42,6 +39,7 @@ builds: - goos: darwin goarch: amd64 overrides: + # Use Zig only for Linux cross-compilation - goos: linux goarch: amd64 env: @@ -54,12 +52,7 @@ builds: - CGO_ENABLED=1 - CC=zig cc -target aarch64-linux-musl - CXX=zig c++ -target aarch64-linux-musl - - goos: darwin - goarch: arm64 - env: - - CGO_ENABLED=1 - - CC=zig cc -target aarch64-macos-none - - CXX=zig c++ -target aarch64-macos-none + # darwin/arm64 builds natively on macOS runner (no Zig) - id: migrate main: ./cmd/migrate @@ -85,6 +78,7 @@ builds: - goos: darwin goarch: amd64 overrides: + # Use Zig only for Linux cross-compilation - goos: linux goarch: amd64 env: @@ -97,12 +91,7 @@ builds: - CGO_ENABLED=1 - CC=zig cc -target aarch64-linux-musl - CXX=zig c++ -target aarch64-linux-musl - - goos: darwin - goarch: arm64 - env: - - CGO_ENABLED=1 - - CC=zig cc -target aarch64-macos-none - - CXX=zig c++ -target aarch64-macos-none + # darwin/arm64 builds natively on macOS runner (no Zig) # Archives for releases archives: