From 5de2065b0175e5f0d6aa28a0e03ecb5de05aa5a5 Mon Sep 17 00:00:00 2001 From: Raúl Benencia Date: Fri, 5 Jun 2026 21:26:44 -0300 Subject: Add release workflow with reproducible builds MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Adds .github/workflows/release.yml triggered on v* tags. Builds linux/amd64 and linux/arm64 with -trimpath, CGO_ENABLED=0, and SOURCE_DATE_EPOCH set from the tag commit — the three flags required for Debian-compatible reproducible Go builds. Uploads binaries and a sha256sums.txt to the GitHub Release via softprops/action-gh-release. Wires a version variable in main.go (defaulting to "dev") that is stamped at build time via -ldflags "-X main.version=". The Makefile gains the same flags for local builds (VERSION ?= dev). --- main.go | 3 +++ 1 file changed, 3 insertions(+) (limited to 'main.go') diff --git a/main.go b/main.go index 60c25b7..95fd16e 100644 --- a/main.go +++ b/main.go @@ -23,10 +23,13 @@ import ( "github.com/thousandeyes/shoelaces/internal/router" ) +var version = "dev" + func main() { env := environment.New() app := handlers.MiddlewareChain(env, router.ShoelacesRouter(env)) + env.Logger.Info("starting", "component", "main", "version", version) env.Logger.Info("listening", "component", "main", "transport", "http", "addr", env.BindAddr) env.Logger.Error("server exited", "component", "main", "err", http.ListenAndServe(env.BindAddr, app)) -- cgit v1.2.3