From c8fb662814fb8542c9cb16338c1d0b26d1d0434c Mon Sep 17 00:00:00 2001 From: Mikhail Wall Date: Mon, 16 Dec 2024 16:05:39 +0100 Subject: [PATCH] feat: added releaser --- cl/.goreleaser.yml | 151 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 151 insertions(+) create mode 100644 cl/.goreleaser.yml diff --git a/cl/.goreleaser.yml b/cl/.goreleaser.yml new file mode 100644 index 000000000..9e89afb54 --- /dev/null +++ b/cl/.goreleaser.yml @@ -0,0 +1,151 @@ +version: 1 + +project_name: cl +dist: /tmp/dist/cl + +builds: + - id: redisapp + env: + - CGO_ENABLED=0 + dir: ./cl/cmd/redisapp + main: ./main.go + binary: redisapp + goos: + - linux + - windows + - darwin + goarch: + - amd64 + - arm64 + ignore: + - goos: windows + goarch: arm64 + + - id: member + env: + - CGO_ENABLED=0 + dir: ./cl/cmd/member + main: ./main.go + binary: member + goos: + - linux + - windows + - darwin + goarch: + - amd64 + - arm64 + ignore: + - goos: windows + goarch: arm64 + + - id: streamer + env: + - CGO_ENABLED=0 + dir: ./cl/cmd/streamer + main: ./main.go + binary: streamer + goos: + - linux + - windows + - darwin + goarch: + - amd64 + - arm64 + ignore: + - goos: windows + goarch: arm64 + +archives: + - id: redisapp + builds: + - redisapp + format: tar.gz + name_template: >- + {{ .ProjectName }}- + {{ .Binary }}_ + {{- with index .Env "RELEASE_VERSION" -}} + {{ . }} + {{- else -}} + {{- if .IsSnapshot }}{{ .ShortCommit }} + {{- else }}{{ .Version }} + {{- end }} + {{- end -}} + {{- with index .Env "DIRTY_SUFFIX" -}} + {{ . }} + {{- end -}}_ + {{- title .Os }}_ + {{- if eq .Arch "amd64" }}x86_64{{ else if eq .Arch "386" }}i386{{ else }}{{ .Arch }}{{ end }} + {{- if .Arm }}v{{ .Arm }}{{ end }} + format_overrides: + - goos: windows + format: zip + + - id: member + builds: + - member + format: tar.gz + name_template: >- + {{ .ProjectName }}- + {{ .Binary }}_ + {{- with index .Env "RELEASE_VERSION" -}} + {{ . }} + {{- else -}} + {{- if .IsSnapshot }}{{ .ShortCommit }} + {{- else }}{{ .Version }} + {{- end }} + {{- end -}} + {{- with index .Env "DIRTY_SUFFIX" -}} + {{ . }} + {{- end -}}_ + {{- title .Os }}_ + {{- if eq .Arch "amd64" }}x86_64{{ else if eq .Arch "386" }}i386{{ else }}{{ .Arch }}{{ end }} + {{- if .Arm }}v{{ .Arm }}{{ end }} + format_overrides: + - goos: windows + format: zip + + - id: streamer + builds: + - streamer + format: tar.gz + name_template: >- + {{ .ProjectName }}- + {{ .Binary }}_ + {{- with index .Env "RELEASE_VERSION" -}} + {{ . }} + {{- else -}} + {{- if .IsSnapshot }}{{ .ShortCommit }} + {{- else }}{{ .Version }} + {{- end }} + {{- end -}} + {{- with index .Env "DIRTY_SUFFIX" -}} + {{ . }} + {{- end -}}_ + {{- title .Os }}_ + {{- if eq .Arch "amd64" }}x86_64{{ else if eq .Arch "386" }}i386{{ else }}{{ .Arch }}{{ end }} + {{- if .Arm }}v{{ .Arm }}{{ end }} + format_overrides: + - goos: windows + format: zip + +checksum: + name_template: >- + {{ .ProjectName }}_ + {{- with index .Env "RELEASE_VERSION" -}} + {{ . }} + {{- else -}} + {{- if .IsSnapshot }}{{ .ShortCommit }} + {{- else }}{{ .Version }} + {{- end }} + {{- end -}} + {{- with index .Env "DIRTY_SUFFIX" -}} + {{ . }} + {{- end -}} + _checksums.txt + +changelog: + sort: asc + filters: + exclude: + - "^docs:" + - "^test:"