From b84bafade4ecdc1a81a8b57c7d7c11709ca6bbe8 Mon Sep 17 00:00:00 2001 From: MrSphay Date: Mon, 4 May 2026 01:25:50 +0200 Subject: [PATCH] Add Windows client artifact build --- .gitea/workflows/build.yml | 61 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml index 8055ce3ee..39b068c11 100644 --- a/.gitea/workflows/build.yml +++ b/.gitea/workflows/build.yml @@ -74,3 +74,64 @@ jobs: name: modrinth-plus-linux path: target/release/bundle/** if-no-files-found: error + + build-windows: + runs-on: ubuntu-latest + env: + MODRINTH_URL: https://modrinth.com/ + MODRINTH_API_BASE_URL: https://api.modrinth.com/ + MODRINTH_ARCHON_BASE_URL: https://archon.modrinth.com/ + MODRINTH_API_URL: https://api.modrinth.com/v2/ + MODRINTH_API_URL_V3: https://api.modrinth.com/v3/ + MODRINTH_SOCKET_URL: wss://api.modrinth.com/ + MODRINTH_LAUNCHER_META_URL: https://launcher-meta.modrinth.com/ + XWIN_CACHE_DIR: .xwin-cache + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Setup Node + uses: actions/setup-node@v4 + with: + node-version-file: .nvmrc + + - name: Setup pnpm + uses: pnpm/action-setup@v4 + with: + version: 9.15.0 + + - name: Setup Rust + uses: dtolnay/rust-toolchain@stable + with: + targets: x86_64-pc-windows-msvc + + - name: Setup Java + uses: actions/setup-java@v4 + with: + distribution: temurin + java-version: "21" + + - name: Install Windows cross-build dependencies + run: | + sudo apt-get update + sudo apt-get install -y \ + clang \ + lld \ + llvm \ + nsis + + - name: Install cargo-xwin + run: cargo install --locked cargo-xwin + + - name: Install dependencies + run: pnpm install --frozen-lockfile + + - name: Build Windows desktop client + run: pnpm --filter @modrinth/app exec tauri build --runner cargo-xwin --target x86_64-pc-windows-msvc --bundles nsis + + - name: Upload Windows desktop client + uses: actions/upload-artifact@v4 + with: + name: modrinth-plus-windows + path: target/x86_64-pc-windows-msvc/release/bundle/nsis/** + if-no-files-found: error