Skip to content

Commit dd34aa0

Browse files
committed
ci(goreleaser): install upx
1 parent 24697a3 commit dd34aa0

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

.github/workflows/cd.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ permissions:
1010

1111
env:
1212
GORELEASER_VERSION: v1.22.3
13+
UPX_VERSION: 4.2.4
1314

1415
jobs:
1516
goreleaser:
@@ -18,6 +19,15 @@ jobs:
1819
- name: Checkout code
1920
uses: actions/checkout@v4
2021

22+
- name: Install UPX
23+
run: |
24+
cd /tmp
25+
F="upx-${UPX_VERSION}-amd64_linux"
26+
curl -OL "https://github.com/upx/upx/releases/download/v${UPX_VERSION}/${F}.tar.xz"
27+
tar xf "${F}.tar.xz"
28+
mv "${F}/upx" /usr/local/bin/
29+
upx --version
30+
2131
- name: Unshallow repo
2232
run: git fetch --prune --unshallow --tags -f
2333

@@ -32,6 +42,7 @@ jobs:
3242
-e CGO_ENABLED=1 \
3343
--env-file .release-env \
3444
-v `pwd`:/src \
45+
-v /usr/local/bin/upx:/usr/local/bin/upx \
3546
-w /src \
3647
ghcr.io/goreleaser/goreleaser-cross:${{ env.GORELEASER_VERSION }} \
3748
release --clean

0 commit comments

Comments
 (0)