diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index a41fe92..404e6e4 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -225,99 +225,4 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - # ── Windows GUI (Tauri) ────────────────────────────────────────────────── - publish-gui: - name: GUI Windows ${{ matrix.arch_label }} - runs-on: windows-latest - strategy: - fail-fast: false - matrix: - include: - - target: x86_64-pc-windows-msvc - arch_label: x64 - tun2socks_arch: windows-amd64 - wintun_arch: amd64 - - target: aarch64-pc-windows-msvc - arch_label: arm64 - tun2socks_arch: windows-arm64 - wintun_arch: arm64 - steps: - - name: Checkout code - uses: actions/checkout@v4 - - - name: Setup Rust - uses: dtolnay/rust-toolchain@stable - with: - targets: ${{ matrix.target }} - - - name: Restore Cargo cache - uses: actions/cache@v4 - with: - path: | - ~/.cargo/registry/index/ - ~/.cargo/registry/cache/ - ~/.cargo/git/db/ - target/ - ostp-gui/src-tauri/target/ - key: cargo-gui-${{ matrix.target }}-${{ hashFiles('**/Cargo.lock') }} - restore-keys: | - cargo-gui-${{ matrix.target }}- - - - name: Setup Node.js - uses: actions/setup-node@v4 - with: - node-version: 20 - cache: npm - cache-dependency-path: ostp-gui/package-lock.json - - # Cache tauri-cli binary to skip reinstall every run - - name: Cache tauri-cli - id: tauri-cli-cache - uses: actions/cache@v4 - with: - path: ~/.cargo/bin/cargo-tauri* - key: tauri-cli-v2-${{ runner.os }} - - - name: Install Tauri CLI (if not cached) - if: steps.tauri-cli-cache.outputs.cache-hit != 'true' - run: cargo install tauri-cli --version "^2" --locked - - - name: Build tun-helper - run: cargo build --release --target ${{ matrix.target }} -p ostp-tun-helper - - - name: Build Tauri app - shell: pwsh - run: | - cd ostp-gui - cargo tauri build --target ${{ matrix.target }} - - - name: Package GUI - shell: pwsh - run: | - $ProgressPreference = 'SilentlyContinue' - $dist = "ostp-gui-dist" - New-Item -ItemType Directory -Force -Path $dist - - $exePath = Get-ChildItem "ostp-gui/src-tauri/target/${{ matrix.target }}/release" -Filter "ostp-gui.exe" | Select-Object -First 1 - Copy-Item $exePath.FullName "$dist/ostp-gui.exe" - Copy-Item "target/${{ matrix.target }}/release/ostp-tun-helper.exe" "$dist/ostp-tun-helper.exe" - - Invoke-WebRequest "https://github.com/xjasonlyu/tun2socks/releases/download/v2.6.0/tun2socks-${{ matrix.tun2socks_arch }}.zip" -OutFile "t2s.zip" - Expand-Archive "t2s.zip" "t2s_tmp" -Force - Get-ChildItem "t2s_tmp" -Filter "*.exe" -Recurse | Select-Object -First 1 | Copy-Item -Destination "$dist/tun2socks.exe" - - Invoke-WebRequest "https://www.wintun.net/builds/wintun-0.14.1.zip" -OutFile "wt.zip" - Expand-Archive "wt.zip" "wt_tmp" -Force - Get-ChildItem "wt_tmp" -Filter "wintun.dll" -Recurse | Where-Object { $_.FullName -match 'bin[\\/]${{ matrix.wintun_arch }}[\\/]' } | Copy-Item -Destination "$dist/" - - Compress-Archive "$dist/*" "ostp-windows-gui-${{ matrix.arch_label }}.zip" -Force - Remove-Item "t2s.zip","t2s_tmp","wt.zip","wt_tmp",$dist -Recurse -Force - - - name: Upload GUI to release - if: ${{ startsWith(github.ref, 'refs/tags/') }} - uses: softprops/action-gh-release@v2 - with: - files: ostp-windows-gui-${{ matrix.arch_label }}.zip - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}