From 77540f1219d7c9457652e43293171a3b13a50a30 Mon Sep 17 00:00:00 2001 From: Andrew LeFevre Date: Mon, 25 Sep 2023 18:26:27 -0400 Subject: [PATCH] add workflow to check that binaries are reproducible --- .github/workflows/reproduce-binary.yml | 19 +++++++++++++++++++ .goreleaser.yml | 2 +- 2 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/reproduce-binary.yml diff --git a/.github/workflows/reproduce-binary.yml b/.github/workflows/reproduce-binary.yml new file mode 100644 index 0000000..cf631a8 --- /dev/null +++ b/.github/workflows/reproduce-binary.yml @@ -0,0 +1,19 @@ +name: Reproduce binary + +on: + push: + branches: + - master + pull_request: + branches: + - "*" + + workflow_dispatch: {} + +jobs: + reproduce-binary: + permissions: + contents: read + uses: capnspacehook/go-workflows/.github/workflows/reproduce-binary.yml@master + with: + extra-build-flags: "-ldflags=-s -w -X main.version=devel" diff --git a/.goreleaser.yml b/.goreleaser.yml index b463dcb..025c32d 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -16,7 +16,7 @@ builds: - -trimpath mod_timestamp: '{{ .CommitTimestamp }}' ldflags: - - -s -w -X "main.version={{ .Tag }}" + - '-s -w -X main.version={{ if eq .Tag "v0.0.0" }}devel{{ else }}{{ .Tag }}{{ end }}' main: ./cmd/egress-eddie archives: