From f1643e7b81e434725a13363b5df82de5393ee3f8 Mon Sep 17 00:00:00 2001 From: Lukasz Raczylo Date: Sun, 19 Apr 2026 20:22:55 +0100 Subject: [PATCH] Fix/release drop broken static (#13) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix(release): drop broken CGO_ENABLED=0 static build target smacker/go-tree-sitter requires CGO: the Node type is defined only in bindings.go behind //go:build cgo, while iter.go references it without a build tag. With CGO_ENABLED=0 every iter.go:N: undefined: Node fails the build. The mcp-filepuff-static target was added in 9205b2b after the last successful release (v0.2.3) and has never produced an artifact — every release since has been red. Dropping it restores the working release shape: darwin_arm64 + linux_amd64 + windows_amd64 CGO binaries, same as v0.2.3 shipped. * feat(release): ship darwin_amd64 and linux_arm64 binaries Shared go-release-cgo.yaml runs each matrix entry natively (no cross- compile), so adding platforms only needs two edits: a platforms input in release.yaml and removal of ignore rules in .goreleaser.yaml. New coverage: - darwin_amd64 on macos-13 runner (Intel Mac) - linux_arm64 on ubuntu-24.04-arm runner (ARM servers, Raspberry Pi, Apple Silicon via Docker/QEMU) Kept: darwin_arm64, linux_amd64, windows_amd64. Still skipped: windows_arm64 (uncommon, ARM Windows runner flakier). --- .github/workflows/release.yaml | 8 ++++++++ .goreleaser.yaml | 23 ----------------------- 2 files changed, 8 insertions(+), 23 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index fcb7143..75ddd72 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -20,4 +20,12 @@ jobs: with: go-version: "1.25" rolling-release-tag: "v1" + platforms: >- + [ + {"os":"macos-13","goos":"darwin","goarch":"amd64","platform":"darwin_amd64"}, + {"os":"macos-latest","goos":"darwin","goarch":"arm64","platform":"darwin_arm64"}, + {"os":"ubuntu-latest","goos":"linux","goarch":"amd64","platform":"linux_amd64"}, + {"os":"ubuntu-24.04-arm","goos":"linux","goarch":"arm64","platform":"linux_arm64"}, + {"os":"windows-latest","goos":"windows","goarch":"amd64","platform":"windows_amd64"} + ] secrets: inherit diff --git a/.goreleaser.yaml b/.goreleaser.yaml index e884007..a3bade7 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -31,32 +31,9 @@ builds: - amd64 - arm64 ignore: - - goos: darwin - goarch: amd64 - - goos: linux - goarch: arm64 - goos: windows goarch: arm64 - - id: mcp-filepuff-static - main: ./cmd/mcp-filepuff - binary: mcp-filepuff - env: - - CGO_ENABLED=0 - flags: - - -trimpath - ldflags: - - -s -w - - -X main.version={{.Version}} - - -X main.commit={{.Commit}} - - -X main.date={{.Date}} - - -extldflags=-static - goos: - - linux - goarch: - - amd64 - - arm64 - archives: - id: default formats: