mirror of
https://github.com/Second-Hand-Friends/kleinanzeigen-bot.git
synced 2026-03-12 02:31:45 +01:00
Install UPX on windows only
This commit is contained in:
35
.github/workflows/build.yml
vendored
35
.github/workflows/build.yml
vendored
@@ -97,31 +97,20 @@ jobs:
|
|||||||
run: sudo apt-get --no-install-recommends install -y binutils
|
run: sudo apt-get --no-install-recommends install -y binutils
|
||||||
|
|
||||||
- name: "Install: UPX"
|
- name: "Install: UPX"
|
||||||
|
if: startsWith(matrix.os, 'windows')
|
||||||
run: |
|
run: |
|
||||||
set -eu
|
set -eu
|
||||||
|
|
||||||
case "${{ matrix.target }}" in
|
upx_download_url=$(curl -fsSL https://api.github.com/repos/upx/upx/releases/latest | grep browser_download_url | grep win64.zip | cut "-d\"" -f4)
|
||||||
macos-*)
|
echo "Downloading [$upx_download_url]..."
|
||||||
brew install upx
|
curl -fL -o /tmp/upx.zip $upx_download_url
|
||||||
;;
|
|
||||||
ubuntu-*)
|
echo "Extracting upx zip..."
|
||||||
mkdir /opt/upx
|
mkdir /tmp/upx
|
||||||
upx_download_url=$(curl -fsSL https://api.github.com/repos/upx/upx/releases/latest | grep browser_download_url | grep amd64_linux.tar.xz | cut "-d\"" -f4)
|
7z e /tmp/upx.zip -o/tmp/upx *.exe -r
|
||||||
echo "Downloading [$upx_download_url]..."
|
echo "$(cygpath -wa /tmp/upx)" >> $GITHUB_PATH
|
||||||
curl -fL $upx_download_url | tar Jxv -C /opt/upx --strip-components=1
|
|
||||||
echo "/opt/upx" >> $GITHUB_PATH
|
/tmp/upx/upx.exe --version
|
||||||
;;
|
|
||||||
windows-*)
|
|
||||||
upx_download_url=$(curl -fsSL https://api.github.com/repos/upx/upx/releases/latest | grep browser_download_url | grep win64.zip | cut "-d\"" -f4)
|
|
||||||
echo "Downloading [$upx_download_url]..."
|
|
||||||
curl -fL -o /tmp/upx.zip $upx_download_url
|
|
||||||
|
|
||||||
echo "Extracting upx.zip..."
|
|
||||||
mkdir /tmp/upx
|
|
||||||
7z e /tmp/upx.zip -o/tmp/upx *.exe -r
|
|
||||||
echo "$(cygpath -wa /tmp/upx)" >> $GITHUB_PATH
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
- name: build self-contained executable
|
- name: build self-contained executable
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
Reference in New Issue
Block a user