@@ -40,7 +40,7 @@ defaults:
40
40
41
41
env :
42
42
JAVA_VERSION : 17
43
- RELEASE_NAME : " snapshot "
43
+ RELEASE_NAME : " latest "
44
44
45
45
46
46
jobs :
@@ -193,11 +193,12 @@ jobs:
193
193
194
194
- arch : " darwin-arm64"
195
195
os : " macos-latest" # ARM
196
+ # using newer graalvm release because 21.3.3.1 is not available for ARM
196
197
graal_version : 23.0.1 # https://github.com/graalvm/graalvm-ce-builds/releases/tag/jdk-23.0.1
197
198
graal_install_root : " graalvm"
198
199
199
200
- arch : " darwin-amd64"
200
- os : " macos-12 " # x64 -> TODO not using macos-13 because of https://github.com/upx/upx/issues/612
201
+ os : " macos-13 " # x64
201
202
# not using newer graalvm release which produces considerably larger binaries
202
203
graal_version : 21.3.3.1 # https://github.com/graalvm/graalvm-ce-builds/releases/tag/vm-21.3.3.1
203
204
graal_install_root : " graalvm"
@@ -387,14 +388,10 @@ jobs:
387
388
esac
388
389
389
390
390
- - name : " Install: MacPorts"
391
- uses : melusina-org/setup-macports@v1
392
- if : runner.os == 'macOS'
393
-
394
-
395
391
- name : " Install: UPX"
396
392
env :
397
393
GITHUB_TOKEN : ${{ github.token }}
394
+ if : runner.os != 'macOS' # https://github.com/upx/upx/issues/612
398
395
run : |
399
396
case "${{ matrix.arch }}" in
400
397
linux-amd64)
@@ -416,9 +413,8 @@ jobs:
416
413
fi
417
414
;;
418
415
darwin-*)
419
- # TODO https://github.com/upx/upx/issues/612 https://github.com/Homebrew/homebrew-core/pull/183634
420
- # brew install upx
421
- sudo port install upx
416
+ # https://github.com/Homebrew/homebrew-core/pull/183634
417
+ brew install upx
422
418
;;
423
419
windows-amd64)
424
420
# first choco install in a build takes 3+ minutes
@@ -549,6 +545,7 @@ jobs:
549
545
550
546
551
547
- name : " Compress executable"
548
+ if : runner.os != 'macOS' # https://github.com/upx/upx/issues/612
552
549
run : |
553
550
set -eu
554
551
case "${{ matrix.arch }}" in
@@ -565,8 +562,7 @@ jobs:
565
562
darwin-*)
566
563
# https://www.unix.com/man-page/osx/1/strip/
567
564
strip copycat-${{ matrix.arch }}
568
- cp copycat-${{ matrix.arch }} copycat-${{ matrix.arch }}-upx
569
- upx -v -9 --force-macos --no-progress copycat-${{ matrix.arch }}-upx
565
+ upx -v -9 --force-macos --no-progress copycat-${{ matrix.arch }}
570
566
;;
571
567
windows-amd64)
572
568
cp copycat-${{ matrix.arch }}.exe copycat-${{ matrix.arch }}-upx.exe
@@ -576,7 +572,7 @@ jobs:
576
572
577
573
578
574
- name : " Test compressed executable"
579
- if : ${{ matrix.arch != 'darwin-arm64' }} # TODO compressed files not working on MacOS 13+ https://github.com/upx/upx/issues/612
575
+ if : runner.os != 'macOS' # https://github.com/upx/upx/issues/612
580
576
run : |
581
577
case "${{ matrix.arch }}" in
582
578
linux-arm64)
@@ -588,12 +584,19 @@ jobs:
588
584
./copycat-${{ matrix.arch }} watch --help
589
585
"
590
586
;;
587
+ windows-*)
588
+ chmod u+x copycat-${{ matrix.arch }}-upx
589
+ ./copycat-${{ matrix.arch }}-upx --version
590
+ ./copycat-${{ matrix.arch }}-upx --help
591
+ ./copycat-${{ matrix.arch }}-upx sync --help
592
+ ./copycat-${{ matrix.arch }}-upx watch --help
593
+ ;;
591
594
*)
592
595
chmod u+x copycat-${{ matrix.arch }}
593
596
./copycat-${{ matrix.arch }} --version
594
597
./copycat-${{ matrix.arch }} --help
595
598
./copycat-${{ matrix.arch }} sync --help
596
- ./copycat-${{ matrix.arch }} --help
599
+ ./copycat-${{ matrix.arch }} watch --help
597
600
;;
598
601
esac
599
602
@@ -627,7 +630,7 @@ jobs:
627
630
628
631
629
632
- name : " Delete previous '${{ env.RELEASE_NAME }}' release"
630
- if : env.RELEASE_NAME == 'snapshot '
633
+ if : env.RELEASE_NAME == 'latest '
631
634
env :
632
635
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
633
636
# https://cli.github.com/manual/gh_release_delete
@@ -642,6 +645,7 @@ jobs:
642
645
run : |
643
646
GH_DEBUG=1 gh release create "$RELEASE_NAME" \
644
647
--latest \
648
+ --title "$RELEASE_NAME" \
645
649
--notes "${{ github.event.head_commit.message }}" \
646
650
--target "${{ github.sha }}" \
647
651
artifacts/copycat-fat.jar#copycat-${{ env.RELEASE_NAME }}-fat.jar \
@@ -650,8 +654,6 @@ jobs:
650
654
artifacts/copycat-linux-arm64#copycat-${{ env.RELEASE_NAME }}-linux-arm64 \
651
655
artifacts/copycat-darwin-amd64#copycat-${{ env.RELEASE_NAME }}-darwin-amd64 \
652
656
artifacts/copycat-darwin-arm64#copycat-${{ env.RELEASE_NAME }}-darwin-arm64 \
653
- artifacts/copycat-darwin-amd64-upx#copycat-${{ env.RELEASE_NAME }}-darwin-amd64-upx \
654
- artifacts/copycat-darwin-arm64-upx#copycat-${{ env.RELEASE_NAME }}-darwin-arm64-upx \
655
657
artifacts/copycat-windows-amd64.exe#copycat-${{ env.RELEASE_NAME }}-windows-amd64.exe \
656
658
artifacts/copycat-windows-amd64-upx.exe#copycat-${{ env.RELEASE_NAME }}-windows-amd64-upx.exe
657
659
0 commit comments