Skip to content

Commit

Permalink
ci(goreleaser): update to v2 config
Browse files Browse the repository at this point in the history
Use built in upx config instead of hook
  • Loading branch information
mloberg committed Jul 12, 2024
1 parent d9d1261 commit 371b315
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 11 deletions.
21 changes: 11 additions & 10 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 371b315

Please sign in to comment.