From 9f924b67234a1ccea3bd28283a70cd15ce967121 Mon Sep 17 00:00:00 2001 From: Ben Vincent Date: Thu, 26 Mar 2026 15:09:22 +1100 Subject: [PATCH] feat: build linux/darwin amd64/arm64 binaries in parallel MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Each target gets its own step depending on test, so all four build concurrently. release step waits for all builds before uploading. 💘 Generated with Crush Assisted-by: Claude Sonnet 4.6 via Crush --- .woodpecker/release.yaml | 33 +++++++++++++++++++++++++++------ 1 file changed, 27 insertions(+), 6 deletions(-) diff --git a/.woodpecker/release.yaml b/.woodpecker/release.yaml index 7361f2e..eccb050 100644 --- a/.woodpecker/release.yaml +++ b/.woodpecker/release.yaml @@ -7,12 +7,28 @@ steps: commands: - go test ./... - - name: build + - name: build-linux-amd64 image: golang:latest commands: - - VERSION=${CI_COMMIT_TAG} - - BINARY=node-lookup-linux-amd64 - - go build -ldflags="-s -w -X main.version=${VERSION}" -o ${BINARY} ./... + - GOOS=linux GOARCH=amd64 go build -ldflags="-s -w -X main.version=${CI_COMMIT_TAG}" -o node-lookup-linux-amd64 ./... + depends_on: [test] + + - name: build-linux-arm64 + image: golang:latest + commands: + - GOOS=linux GOARCH=arm64 go build -ldflags="-s -w -X main.version=${CI_COMMIT_TAG}" -o node-lookup-linux-arm64 ./... + depends_on: [test] + + - name: build-darwin-amd64 + image: golang:latest + commands: + - GOOS=darwin GOARCH=amd64 go build -ldflags="-s -w -X main.version=${CI_COMMIT_TAG}" -o node-lookup-darwin-amd64 ./... + depends_on: [test] + + - name: build-darwin-arm64 + image: golang:latest + commands: + - GOOS=darwin GOARCH=arm64 go build -ldflags="-s -w -X main.version=${CI_COMMIT_TAG}" -o node-lookup-darwin-arm64 ./... depends_on: [test] - name: release @@ -31,8 +47,13 @@ steps: NOTES=$(git log --merges --pretty=format:"- %s") fi tea releases edit "${CI_COMMIT_TAG}" --note "${NOTES}" --login gitea --repo "${CI_REPO}" - tea releases assets create "${CI_COMMIT_TAG}" node-lookup-linux-amd64 --login gitea --repo "${CI_REPO}" + tea releases assets create "${CI_COMMIT_TAG}" \ + node-lookup-linux-amd64 \ + node-lookup-linux-arm64 \ + node-lookup-darwin-amd64 \ + node-lookup-darwin-arm64 \ + --login gitea --repo "${CI_REPO}" backend_options: kubernetes: serviceAccountName: default - depends_on: [build] + depends_on: [build-linux-amd64, build-linux-arm64, build-darwin-amd64, build-darwin-arm64]