Skip to content

Commit c46d52b

Browse files
Compress release with UPX (#3445)
1 parent e6c43ca commit c46d52b

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

.github/workflows/release.yml

+4
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,10 @@ jobs:
3939
go-version: "1.23"
4040
- name: Cosign install
4141
uses: sigstore/cosign-installer@dc72c7d5c4d10cd6bcb8cf6e3fd625a9e5e537da # v3.7.0
42+
- name: Install UPX
43+
run: |
44+
sudo apt-get update
45+
sudo apt-get install -y upx
4246
- name: Run GoReleaser
4347
uses: goreleaser/goreleaser-action@v6
4448
with:

.goreleaser.yml

+3
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ builds:
1111
goarch:
1212
- amd64
1313
- arm64
14+
hooks:
15+
post:
16+
- bash -c 'if [ "{{ .Env.GGOOS }}" != "darwin" ]; then upx -q "{{ .Path }}"; fi'
1417
dockers:
1518
- image_templates: ["trufflesecurity/{{ .ProjectName }}:{{ .Version }}-amd64"]
1619
dockerfile: Dockerfile.goreleaser

0 commit comments

Comments
 (0)