From 062990151484e7886ad4d82d395d29e00482d839 Mon Sep 17 00:00:00 2001 From: Saumit Dinesan Date: Tue, 26 Dec 2023 06:12:08 +0530 Subject: Adding go-releaser for CI --- .gitignore | 2 ++ .goreleaser.yaml | 39 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 41 insertions(+) create mode 100644 .goreleaser.yaml diff --git a/.gitignore b/.gitignore index c8e5f92..9cddefa 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,5 @@ vendor/ # db and compiled binary hashstore.db main + +dist/ diff --git a/.goreleaser.yaml b/.goreleaser.yaml new file mode 100644 index 0000000..b2061a5 --- /dev/null +++ b/.goreleaser.yaml @@ -0,0 +1,39 @@ +version: 1 + +before: + hooks: + - go mod tidy +env: + - CGO_ENABLED=0 + +builds: + - binary: go-fis-api + id: go-fis-api + goos: + - linux + - darwin + - windows + goarch: + - amd64 + - arm64 + ldflags: + - -s -w -X "main.buildString={{ .Tag }} ({{ .ShortCommit }} {{ .Date }})" + +archives: + - format: tar.gz + files: + - README.md + - LICENSE + - .env.example + # use zip for windows archives + format_overrides: + - goos: windows + format: zip + +changelog: + sort: asc + filters: + exclude: + - "^docs:" + - "^test:" + - "^Initial trial" -- cgit v1.2.3