Skip to content

Find, verify, and analyze leaked credentials

Compress release with UPX (#3456)

Dustin Deckerf19d6e5d2bef
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 33c86fd6a..6b6a9bba6 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -39,12 +39,17 @@ 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:
- distribution: goreleaser
+ distribution: goreleaser-pro
version: latest
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
HOMEBREW_TAP_TOKEN: ${{ secrets.HOMEBREW_TAP_TOKEN }}
+ GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }}
diff --git a/.goreleaser.yml b/.goreleaser.yml
index e951f9579..b7b354462 100644
--- a/.goreleaser.yml
+++ b/.goreleaser.yml
@@ -1,13 +1,26 @@
version: 2
builds:
- - binary: trufflehog
+ - id: trufflehog-upx
+ binary: trufflehog
ldflags:
- -s -w -X 'github.com/trufflesecurity/trufflehog/v3/pkg/version.BuildVersion={{ .Version }}'
env: [CGO_ENABLED=0]
goos:
- linux
- - windows
+ goarch:
+ - amd64
+ - arm64
+ hooks:
+ post:
+ - upx -q "{{ .Path }}"
+ - id: trufflehog
+ binary: trufflehog
+ ldflags:
+ - -X 'github.com/trufflesecurity/trufflehog/v3/pkg/version.BuildVersion={{ .Version }}'
+ env: [CGO_ENABLED=0]
+ goos:
- darwin
+ - windows
goarch:
- amd64
- arm64