From 7ac985f847232e9c00ddb5f7462ea6f5d471db37 Mon Sep 17 00:00:00 2001 From: Kohei Morita Date: Thu, 23 Sep 2021 20:06:34 +0900 Subject: [PATCH] add goreleaser Signed-off-by: Kohei Morita --- .gitignore | 2 ++ .goreleaser.yml | 30 ++++++++++++++++++++++++++++++ 2 files changed, 32 insertions(+) create mode 100644 .goreleaser.yml diff --git a/.gitignore b/.gitignore index 5e34348..7a35bc7 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,4 @@ vendor/ bouheki + +dist/ diff --git a/.goreleaser.yml b/.goreleaser.yml new file mode 100644 index 0000000..c50c1e7 --- /dev/null +++ b/.goreleaser.yml @@ -0,0 +1,30 @@ +before: + hooks: + - go mod tidy + - go generate ./... +builds: + - env: + - CGO_ENABLED=1 + - CGO_LDFLAGS=-Wl,-Bstatic -lbpf -Wl,-Bdynamic + goos: + - linux + goarch: + - amd64 + ldflags: + - -w -s -X main.version={{.Version}} + main: ./cmd/bouheki + binary: bouheki +archives: + - replacements: + linux: Linux + amd64: x86_64 +checksum: + name_template: 'checksums.txt' +snapshot: + name_template: "{{ incpatch .Version }}-next" +changelog: + sort: asc + filters: + exclude: + - '^docs:' + - '^test:'