Add the GoReleaser release pipeline#52
Merged
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.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..github/workflows/release.yml):goreleaser checkon every PR and push to main, the fullrelease --cleanonly on av*tag.-ldflags -X, with a build-info fallback forgo build/go run.--versionprints them.SIGUSR1/SIGUSR2do 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.go install.Validation
goreleaser checkpasses; agoreleaser build --snapshotproduces a binary whose--versionshows the stamped version, commit, and date.go build ./...,go vet ./..., andgo test ./...all green.Pure-Go sqlite (
modernc.org/sqlite) keeps the whole matrix CGO-free, so every target cross-compiles from one runner.