diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 33c86fd6a8b8..db77574b4de1 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -39,6 +39,10 @@ jobs: go-version: "1.23" - name: Cosign install uses: sigstore/cosign-installer@dc72c7d5c4d10cd6bcb8cf6e3fd625a9e5e537da # v3.7.0 + - name: Install UPX + run: | + sudo apt-get update + sudo apt-get install -y upx - name: Run GoReleaser uses: goreleaser/goreleaser-action@v6 with: diff --git a/.goreleaser.yml b/.goreleaser.yml index 77bc73d8cf0a..6fca8511fdc0 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -11,6 +11,9 @@ builds: goarch: - amd64 - arm64 + hooks: + post: + - bash -c 'if [ "{{ .Env.GGOOS }}" != "darwin" ]; then upx -q "{{ .Path }}"; fi' dockers: - image_templates: ["trufflesecurity/{{ .ProjectName }}:{{ .Version }}-amd64"] dockerfile: Dockerfile.goreleaser