diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 0b6c20b..176004a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -17,7 +17,7 @@ jobs: go-version-file: go.mod check-latest: true cache: true - - uses: goreleaser/goreleaser-action@v5 + - uses: goreleaser/goreleaser-action@v6 with: args: release env: diff --git a/.goreleaser.yaml b/.goreleaser.yaml index 48ff8c1..b8d7fac 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -1,23 +1,24 @@ +version: 2 before: hooks: - go mod tidy - go generate ./... builds: - - env: - - CGO_ENABLED=0 + - goos: + - linux + goarch: + - amd64 + - arm64 flags: - -trimpath - -mod=readonly ldflags: - -s -w - goos: - - linux - goarch: - - amd64 - - arm64 - hooks: - post: - - upx --brute {{ .Path }} + env: + - CGO_ENABLED=0 +upx: + - enabled: true + brute: true archives: - name_template: '{{ .ProjectName }}_{{ .Os }}_{{ .Arch }}' format: binary diff --git a/Makefile b/Makefile index d0a8d5c..8744156 100644 --- a/Makefile +++ b/Makefile @@ -11,7 +11,7 @@ help: build: ## Build binary @echo "+ $@" - @goreleaser build --snapshot --rm-dist --skip-post-hooks + @goreleaser build --snapshot --clean .PHONY: build generate: ## Autogenerate code and resources