Skip to content

Add the GoReleaser release pipeline#52

Merged
tamnd merged 4 commits into
mainfrom
release/v0.1.1
Jun 13, 2026
Merged

Add the GoReleaser release pipeline#52
tamnd merged 4 commits into
mainfrom
release/v0.1.1

Conversation

@tamnd

@tamnd tamnd commented Jun 13, 2026

Copy link
Copy Markdown
Owner

Sets dbrest up to ship the way ccrawl-cli does: one version tag turns into every artifact a user might install from.

What lands

  • GoReleaser config (.goreleaser.yaml): builds for linux (amd64, arm64, arm v7, 386), darwin (amd64, arm64), windows (amd64, arm64), and freebsd (amd64, arm64). One tag fans out to raw archives, deb/rpm/apk packages, a multi-arch GHCR image, a checksums file, a CycloneDX SBOM per archive, and a keyless cosign signature. The Homebrew cask and Scoop manifest self-disable until their tap and bucket tokens exist, so a tokenless release still produces every download and the image.
  • Release workflow (.github/workflows/release.yml): goreleaser check on every PR and push to main, the full release --clean only on a v* tag.
  • Dockerfile: now copies the prebuilt binary GoReleaser stages per platform instead of compiling, so the image ships the same static binary as the archives. Exposes 3000 (API) and 3001 (admin).
  • Version stamping: the binary now carries its version, commit, and build date via -ldflags -X, with a build-info fallback for go build/go run. --version prints them.
  • Windows portability: SIGUSR1/SIGUSR2 do not exist on Windows, so the reload signal handler moved into a unix-tagged file with a no-op elsewhere. This is what lets the windows targets (and the Scoop manifest) build. The db-channel listener and admin API still drive reloads on every platform.
  • README: an Install section covering the archives, image, packages, and go install.

Validation

  • Cross-compiled all ten release targets, including windows/amd64 and windows/arm64, which previously failed on the Unix-only signals.
  • goreleaser check passes; a goreleaser build --snapshot produces a binary whose --version shows the stamped version, commit, and date.
  • go build ./..., go vet ./..., and go test ./... all green.

Pure-Go sqlite (modernc.org/sqlite) keeps the whole matrix CGO-free, so every target cross-compiles from one runner.

tamnd added 4 commits June 14, 2026 00:47
SIGUSR1 and SIGUSR2 do not exist on Windows, so reload.go failed to
cross-compile for windows/amd64 and windows/arm64. Move watchSignals into
reload_signals_unix.go behind a unix build tag and add a no-op for the
platforms without the signals. The db-channel listener and the admin API
still drive reloads everywhere; only the signal path is Unix-only.

This unblocks the windows targets the release build needs.
Add package-level version, commit, and date vars the release pipeline sets
with -ldflags -X. An unstamped build still works: versionString falls back
to the module version from the build info, then to "dev". The --version
verb now prints the commit and build date when they were stamped.
One tag push fans out to raw archives, deb/rpm/apk packages, a multi-arch
GHCR image, a checksums file, a CycloneDX SBOM per archive, and a keyless
cosign signature. The Homebrew cask and Scoop manifest self-disable until
their tap and bucket tokens are set, so a tokenless release still produces
every downloadable artifact and the image.

The Dockerfile now copies the prebuilt binary GoReleaser stages per platform
instead of compiling, so the image ships the same static binary as the
archives. release.yml runs goreleaser check on every PR and push, and the
full release only on a version tag.
Add an Install section covering the release archives, the GHCR image, the
deb and rpm packages, go install, and what each release carries (checksums,
SBOM, cosign signature). The Quick start keeps using go run for local work.
@tamnd tamnd merged commit 3cf13af into main Jun 13, 2026
6 checks passed
@tamnd tamnd deleted the release/v0.1.1 branch June 13, 2026 17:51
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