fix: use universal .zip for all tun2socks downloads in release CI workflow

This commit is contained in:
ospab 2026-05-15 17:10:01 +03:00
parent b3ff592009
commit 89fd886639
1 changed files with 6 additions and 14 deletions

View File

@ -175,20 +175,12 @@ jobs:
shell: bash shell: bash
run: | run: |
cd target/${{ matrix.target }}/release cd target/${{ matrix.target }}/release
# Fetch using correct extension (Linux = .tar.gz, Darwin/FreeBSD = .zip) # All platforms in tun2socks v2.6.0 use .zip packaging
if [[ "${{ matrix.tun2socks_arch }}" == *"linux"* ]]; then URL="https://github.com/xjasonlyu/tun2socks/releases/download/v2.6.0/tun2socks-${{ matrix.tun2socks_arch }}.zip"
URL="https://github.com/xjasonlyu/tun2socks/releases/download/v2.6.0/tun2socks-${{ matrix.tun2socks_arch }}.tar.gz" curl -L "$URL" -o "tun2socks.zip"
curl -L "$URL" -o "tun2socks.tar.gz" unzip -o "tun2socks.zip"
tar -xzf "tun2socks.tar.gz" find . -maxdepth 2 -name "tun2socks*" ! -name "*.zip" -type f -exec mv {} ./tun2socks \;
find . -maxdepth 2 -name "tun2socks*" ! -name "*.tar.gz" -type f -exec mv {} ./tun2socks \; rm -f "tun2socks.zip"
rm -f "tun2socks.tar.gz"
else
URL="https://github.com/xjasonlyu/tun2socks/releases/download/v2.6.0/tun2socks-${{ matrix.tun2socks_arch }}.zip"
curl -L "$URL" -o "tun2socks.zip"
unzip -o "tun2socks.zip"
find . -maxdepth 2 -name "tun2socks*" ! -name "*.zip" -type f -exec mv {} ./tun2socks \;
rm -f "tun2socks.zip"
fi
chmod +x tun2socks || true chmod +x tun2socks || true
- name: Package release artifact (Windows) - name: Package release artifact (Windows)