summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSaumit Dinesan <justsaumit@protonmail.com>2023-12-26 06:12:08 +0530
committerSaumit Dinesan <justsaumit@protonmail.com>2023-12-26 06:12:08 +0530
commit062990151484e7886ad4d82d395d29e00482d839 (patch)
tree3b45dfd5a7cc4fceffee6d3460e772188667fb80
parentbd1fb6167b28d92c06f75fe414f219c83a03b0af (diff)
Adding go-releaser for CI
-rw-r--r--.gitignore2
-rw-r--r--.goreleaser.yaml39
2 files changed, 41 insertions, 0 deletions
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"