Skip to content

Commit f19d6e5

Browse files
Compress release with UPX (#3456)
* Compress release with UPX * Allow UPX to fail, and use goreleaser-pro * update
1 parent e68e671 commit f19d6e5

File tree

2 files changed

+21
-3
lines changed

2 files changed

+21
-3
lines changed

.github/workflows/release.yml

+6-1
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,17 @@ 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:
45-
distribution: goreleaser
49+
distribution: goreleaser-pro
4650
version: latest
4751
args: release --clean
4852
env:
4953
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5054
HOMEBREW_TAP_TOKEN: ${{ secrets.HOMEBREW_TAP_TOKEN }}
55+
GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }}

.goreleaser.yml

+15-2
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,26 @@
11
version: 2
22
builds:
3-
- binary: trufflehog
3+
- id: trufflehog-upx
4+
binary: trufflehog
45
ldflags:
56
- -s -w -X 'github.com/trufflesecurity/trufflehog/v3/pkg/version.BuildVersion={{ .Version }}'
67
env: [CGO_ENABLED=0]
78
goos:
89
- linux
9-
- windows
10+
goarch:
11+
- amd64
12+
- arm64
13+
hooks:
14+
post:
15+
- upx -q "{{ .Path }}"
16+
- id: trufflehog
17+
binary: trufflehog
18+
ldflags:
19+
- -X 'github.com/trufflesecurity/trufflehog/v3/pkg/version.BuildVersion={{ .Version }}'
20+
env: [CGO_ENABLED=0]
21+
goos:
1022
- darwin
23+
- windows
1124
goarch:
1225
- amd64
1326
- arm64

0 commit comments

Comments
 (0)