ci: restore macOS Keychain for cfl and jtk darwin releases [INT-450]#376
Conversation
Split each goreleaser build into a darwin (CGO_ENABLED=1, xcrun clang) target and a linux/windows (CGO_ENABLED=0) target so that 99designs/keyring's keychain.go (//go:build darwin && cgo) is compiled into the macOS binaries. Without cgo the init() that registers the Keychain backend is omitted; credstore auto-selects BackendKeychain then keyring.Open returns ErrNoAvailImpl, failing closed on every macOS credential op since the credstore migration. Move both release jobs to macos-15 (cgo+darwin cannot cross-compile from Linux). Restructure each job: goreleaser install-only → check → snapshot → pre-publish gate → publish. Gate asserts Security.framework is linked in the amd64 binary (otool) and that the arm64 binary's config show reports keychain backend auto-selected (functional, isolated HOME/XDG, no real token required). nfpms.ids pins each tool's unix-win build id so deb/rpm never pull a darwin binary. Closes #375
|
No findings. I verified PR #376’s actual diff is limited to the expected four files. Both GoReleaser configs match the template: split The workflow ordering is correct in both release files: install/check, temp semver tag, snapshot build with Bash/tooling looks macOS-safe: no |
Summary
{tool}-darwinbuild (CGO_ENABLED=1,xcrun clang) and a{tool}-unix-winbuild (CGO_ENABLED=0), covering both amd64 and arm64 for each GOOS grouprelease-cfl.ymlandrelease-jtk.ymlgoreleaser jobs fromubuntu-latesttomacos-15so cgo+darwin compiles nativelySecurity.frameworklinked in amd64 binary andkeychain (auto)reported by the arm64 binary's config show → publish only if gate passesnfpms.idsto each tool's unix-win build id so deb/rpm packages never pull a darwin binaryFixes [INT-450] / Closes #375
Root cause
99designs/keyring/keychain.gois//go:build darwin && cgo. WithCGO_ENABLED=0(the previous build), theinit()that registers the macOS Keychain backend is never compiled in. At runtime, credstore auto-selectsBackendKeychainthenkeyring.OpenreturnsErrNoAvailImpl, failing closed on every macOS credential op since the credstore migration.Files changed
.goreleaser-cfl.yml— split single build intocfl-darwin(CGO=1) +cfl-unix-win(CGO=0);nfpms.ids: [cfl-unix-win].goreleaser-jtk.yml— split single build intojtk-darwin(CGO=1) +jtk-unix-win(CGO=0);nfpms.ids: [jtk-unix-win].github/workflows/release-cfl.yml—macos-15runner; install-only goreleaser; check → snapshot → gate → publish; verify release notes.github/workflows/release-jtk.yml— same restructure; preserves jira-ticket-cli alias cask sed step and tag-rename danceTest plan
goreleaser check -f .goreleaser-cfl.ymlexits 0goreleaser check -f .goreleaser-jtk.ymlexits 0cfl --output json config showwith isolated HOME/XDG reportskeychain (auto)jtk config showwith isolated HOME/XDG reportskeychain (auto)