Compress release with UPX (#3456)
Lint / golangci-lint (push) Waiting to run
Lint / semgrep (push) Waiting to run
Release / Release (push) Waiting to run
Scan for secrets / test (push) Waiting to run
Test / test (push) Waiting to run
Test / test-community (push) Waiting to run

* Compress release with UPX

* Allow UPX to fail, and use goreleaser-pro

* update
This commit is contained in:
Dustin Decker
2025-02-05 15:33:44 -06:00
committed by GitHub
parent e68e67137c
commit f19d6e5d2b
2 changed files with 21 additions and 3 deletions
+6 -1
View File
@@ -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 }}
+15 -2
View File
@@ -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