name: Build Windows GLS Team Foundation on: push: branches: - main paths: - ".github/workflows/build-windows-manual.yml" workflow_dispatch: inputs: version: description: "GLS team installer version" required: true default: "0.1.7" type: string env: NODE_OPTIONS: --max-old-space-size=4096 RUST_TARGET_CACHE_VERSION: v2026-07-19-hololake-team-windows-xwin jobs: build-windows: name: Build Windows x64 GLS team installer runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - name: Setup pnpm uses: pnpm/action-setup@f40ffcd9367d9f12939873eb1018b921a783ffaa with: version: 10 - name: Setup Node.js uses: actions/setup-node@v4 with: node-version: "22" cache: "pnpm" - name: Install Linux cross-build dependencies run: | sudo apt-get update sudo apt-get install -y nsis lld llvm clang - name: Setup Rust uses: dtolnay/rust-toolchain@29eef336d9b2848a0b548edc03f92a220660cdb8 - name: Cache Rust dependencies uses: actions/cache@v4 with: path: | ~/.cargo/registry ~/.cargo/git src-tauri/target .xwin-cache key: ${{ runner.os }}-team-windows-cargo-x86_64-pc-windows-msvc-${{ env.RUST_TARGET_CACHE_VERSION }}-${{ hashFiles('src-tauri/Cargo.lock') }} restore-keys: | ${{ runner.os }}-team-windows-cargo-x86_64-pc-windows-msvc-${{ env.RUST_TARGET_CACHE_VERSION }}- - name: Install cargo-xwin run: cargo install --locked cargo-xwin - name: Install dependencies run: pnpm install --frozen-lockfile - name: Set app version run: | version="${{ inputs.version }}" if [ -z "$version" ]; then version="0.1.7"; fi jq --arg version "$version" '.version = $version' src-tauri/tauri.conf.json > src-tauri/tauri.conf.json.tmp mv src-tauri/tauri.conf.json.tmp src-tauri/tauri.conf.json sed -i "s/^version = \".*\"/version = \"$version\"/" src-tauri/Cargo.toml - name: Build unsigned NSIS installer for GLS team testing env: VITE_SENTRY_DSN: "" SENTRY_DSN: "" VITE_POSTHOG_KEY: "" VITE_POSTHOG_HOST: "" XWIN_CACHE_DIR: ${{ github.workspace }}/.xwin-cache run: | pnpm tauri build \ --runner cargo-xwin \ --target x86_64-pc-windows-msvc \ --bundles nsis \ --config src-tauri/tauri.team.conf.json - name: Validate installer run: | shopt -s nullglob installers=(src-tauri/target/x86_64-pc-windows-msvc/release/bundle/nsis/*-setup.exe) if [ ${#installers[@]} -eq 0 ]; then echo "::error::Windows build produced no NSIS setup executable." exit 1 fi for installer in "${installers[@]}"; do echo "Built Windows GLS team installer: $installer" file "$installer" | grep -q 'PE32' || { echo "::error::Unexpected installer format: $installer" exit 1 } sha256sum "$installer" > "$installer.sha256" done - name: Upload Windows installer uses: actions/upload-artifact@v4 with: name: HoloLake-Era-Team-Foundation-Windows-x64 path: | src-tauri/target/x86_64-pc-windows-msvc/release/bundle/nsis/*-setup.exe src-tauri/target/x86_64-pc-windows-msvc/release/bundle/nsis/*-setup.exe.sha256 if-no-files-found: error retention-days: 7