Windows Package Validation #5
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Windows Package Validation | |
| on: | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| jobs: | |
| build: | |
| name: Build Windows x64 installer | |
| runs-on: windows-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@v6 | |
| with: | |
| version: 10 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: 24 | |
| cache: pnpm | |
| - name: Setup Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| targets: x86_64-pc-windows-msvc | |
| - name: Cache Rust | |
| uses: swatinem/rust-cache@v2 | |
| with: | |
| workspaces: src-tauri -> target | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Test frontend | |
| run: pnpm test | |
| - name: Typecheck frontend | |
| run: pnpm typecheck | |
| - name: Test Rust backend | |
| run: cargo test --manifest-path src-tauri/Cargo.toml | |
| - name: Build Windows installer | |
| shell: bash | |
| run: pnpm tauri build --target x86_64-pc-windows-msvc --config '{"bundle":{"createUpdaterArtifacts":false}}' | |
| - name: Prepare Windows installer | |
| shell: bash | |
| run: | | |
| set -euo pipefail | |
| setup="$(find src-tauri/target/x86_64-pc-windows-msvc/release/bundle/nsis -maxdepth 1 -type f -name '*-setup.exe' | head -n 1)" | |
| if [[ -z "${setup}" ]]; then | |
| echo "No Tauri NSIS installer was found." | |
| exit 1 | |
| fi | |
| mkdir -p validation-assets | |
| cp "${setup}" validation-assets/codex-usage-desktop-windows-x64-setup.exe | |
| - name: Upload Windows installer | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: codex-usage-desktop-windows-x64 | |
| path: validation-assets/codex-usage-desktop-windows-x64-setup.exe | |
| if-no-files-found: error |