Skip to content

[SDK-2337] Replace GoReleaser with custom build scripts#660

Draft
aaron-zeisler wants to merge 4 commits into
v8from
aaronz/SDK-2337/replace-goreleaser-experiment
Draft

[SDK-2337] Replace GoReleaser with custom build scripts#660
aaron-zeisler wants to merge 4 commits into
v8from
aaronz/SDK-2337/replace-goreleaser-experiment

Conversation

@aaron-zeisler
Copy link
Copy Markdown

@aaron-zeisler aaron-zeisler commented May 7, 2026

Summary

  • Replace the 529-line .goreleaser.yml with three focused shell scripts that handle cross-compilation, system packaging, and Docker image builds independently
  • Remove the GoReleaser dependency entirely in favor of go build, standalone nfpm, and docker buildx
  • Preserve all existing release artifacts, attestation outputs, and dry-run support

Motivation

GoReleaser is opaque and difficult to debug when releases fail. Other LaunchDarkly teams (gonfalon, event-recorder, streamer, foundation) don't use it, and sdk-meta already removed it. The new scripts are individually testable, readable (~60-100 lines each vs 529 lines of YAML), and follow patterns established elsewhere in the org.

Changes

File Description
scripts/cross-compile.sh Builds all 9 OS/arch targets, produces .tar.gz archives + checksums.txt
scripts/build-packages.sh Uses standalone nfpm to create .deb/.rpm packages
scripts/docker-build.sh Uses docker buildx for multi-platform builds, creates multi-arch manifests
nfpm.yml Standalone package config (was embedded in GoReleaser)
.github/actions/publish/action.yml Orchestrates new scripts, preserves attestation outputs
Dockerfile*.goreleaser Accept BINARY build arg for flexible binary path
Makefile Updated publish/products-for-release targets
.goreleaser.yml Deleted
scripts/run-goreleaser.sh Deleted

Test plan

  • scripts/cross-compile.sh tested locally — all 9 targets build successfully
  • scripts/build-packages.sh — requires nfpm (will test in CI)
  • scripts/docker-build.sh — requires Docker buildx with multi-platform support (will test in CI)
  • End-to-end dry-run via the publish action in CI
  • Verify artifact names match existing GitHub Release naming conventions
  • Verify internal deployment (Ansible) can still fetch linux_amd64.tar.gz

JIRA

SDK-2337

Made with Cursor

Remove the 529-line .goreleaser.yml and replace it with three focused
shell scripts that handle cross-compilation, system packaging, and
Docker image builds independently.

- scripts/cross-compile.sh: builds all 9 OS/arch targets using go build,
  produces .tar.gz archives and checksums.txt
- scripts/build-packages.sh: uses standalone nfpm to create .deb/.rpm
  packages from pre-built binaries
- scripts/docker-build.sh: uses docker buildx for multi-platform builds
  across 3 image variants, creates multi-arch manifests
- nfpm.yml: standalone package configuration (previously embedded in
  GoReleaser config)
- Updated .github/actions/publish/action.yml to orchestrate the new
  scripts, preserving attestation outputs and dry-run support
- Updated Dockerfiles to accept BINARY build arg for flexible binary
  path injection
- Updated Makefile publish/products-for-release targets

Tracked by SDK-2337.

Co-authored-by: Cursor <cursoragent@cursor.com>
aaron-zeisler and others added 3 commits May 8, 2026 09:06
…nerate metadata

The Docker Scout Scan CI job was failing because:
1. nfpm was not installed (build-packages.sh needs it)
2. products-for-release didn't build Docker images
3. dist/metadata.json was not generated for version extraction

Fixes:
- Install nfpm via go install in CI workflow
- Add docker-build.sh --dry-run to products-for-release target
- Use --load flag in dry-run mode so images are available locally
- Generate dist/metadata.json in cross-compile.sh

Co-authored-by: Cursor <cursoragent@cursor.com>
Standalone nfpm uses 'depends' for package dependencies under
overrides, not 'dependencies' (which is the GoReleaser-embedded
nfpm syntax).

Co-authored-by: Cursor <cursoragent@cursor.com>
nfpm does not expand environment variables in contents[].src paths.
Pre-process nfpm.yml through envsubst before passing to nfpm to
ensure VERSION and NFPM_ARCH_LABEL are properly substituted.

Co-authored-by: Cursor <cursoragent@cursor.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant