From 4024a31e392f33c372c6c180155aa26719b4f676 Mon Sep 17 00:00:00 2001 From: Alexei Yuzhakov Date: Wed, 11 Oct 2023 20:30:53 +0300 Subject: [PATCH] TECH Update GoReleaser config for the new version --- .github/workflows/release.yml | 2 +- .goreleaser.yml | 14 ++++++++------ Makefile | 2 +- 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ae94655..1bef22d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -22,6 +22,6 @@ jobs: with: distribution: goreleaser version: latest - args: release --rm-dist + args: release --clean env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.goreleaser.yml b/.goreleaser.yml index 7a174d8..3cf336a 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -20,12 +20,14 @@ builds: ldflags: - -s -w -X main.version={{.Version}} -X main.commit={{.ShortCommit}} -X main.date={{.Date}} archives: - - name_template: "{{ .ProjectName }}-{{ .Version }}-{{ .Os }}-{{ .Arch }}" - replacements: - darwin: mac - linux: linux - windows: win - amd64: x86_64 + - name_template: >- + {{- .ProjectName }}- + {{- .Version }}- + {{- if eq .Os "darwin" }}mac + {{- else if eq .Os "windows" }}win + {{- else }}{{ .Os }}{{ end }}- + {{- if eq .Arch "amd64" }}x86_64 + {{- else }}{{ .Arch }}{{ end }} format: tar.gz format_overrides: - goos: windows diff --git a/Makefile b/Makefile index 070186c..b6fd317 100644 --- a/Makefile +++ b/Makefile @@ -13,7 +13,7 @@ build: test go build -ldflags "$(LDFLAGS)" release: test - goreleaser release --rm-dist + goreleaser release --clean run: go run main.go