|
| 1 | +name: Test Windows Build |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + tags: |
| 6 | + - 'test-windows-v*.*.*' |
| 7 | + |
| 8 | +permissions: |
| 9 | + contents: write |
| 10 | + |
| 11 | +env: |
| 12 | + CARGO_INCREMENTAL: 0 |
| 13 | + RUST_BACKTRACE: short |
| 14 | + |
| 15 | +concurrency: |
| 16 | + group: '${{ github.workflow }}-${{ github.ref }}' |
| 17 | + cancel-in-progress: true |
| 18 | + |
| 19 | +jobs: |
| 20 | + build-windows: |
| 21 | + name: Build (x86_64-pc-windows-msvc) |
| 22 | + runs-on: windows-latest |
| 23 | + steps: |
| 24 | + - uses: actions/checkout@v4 |
| 25 | + |
| 26 | + - name: Install Rust |
| 27 | + uses: dtolnay/rust-toolchain@stable |
| 28 | + with: |
| 29 | + targets: x86_64-pc-windows-msvc |
| 30 | + |
| 31 | + - name: Rust cache |
| 32 | + uses: Swatinem/rust-cache@v2 |
| 33 | + with: |
| 34 | + prefix-key: 'v1' |
| 35 | + key: 'windows-latest-x86_64-pc-windows-msvc' |
| 36 | + workspaces: src-tauri -> target |
| 37 | + |
| 38 | + - name: Install Protoc |
| 39 | + uses: arduino/setup-protoc@v3 |
| 40 | + with: |
| 41 | + repo-token: ${{ secrets.GITHUB_TOKEN }} |
| 42 | + |
| 43 | + - uses: actions/setup-node@v4 |
| 44 | + with: |
| 45 | + node-version: '20' |
| 46 | + |
| 47 | + - uses: pnpm/action-setup@v4 |
| 48 | + with: |
| 49 | + run_install: false |
| 50 | + |
| 51 | + - name: Install frontend dependencies |
| 52 | + run: pnpm install --frozen-lockfile |
| 53 | + |
| 54 | + - name: Build with Tauri |
| 55 | + uses: tauri-apps/tauri-action@v0 |
| 56 | + env: |
| 57 | + NODE_OPTIONS: '--max_old_space_size=4096' |
| 58 | + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 59 | + TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY }} |
| 60 | + TAURI_SIGNING_PRIVATE_KEY_PASSWORD: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY_PASSWORD }} |
| 61 | + with: |
| 62 | + tagName: ${{ github.ref_name }} |
| 63 | + releaseName: 'AQBot Test ${{ github.ref_name }}' |
| 64 | + releaseDraft: true |
| 65 | + prerelease: true |
| 66 | + tauriScript: pnpm tauri |
| 67 | + args: --target x86_64-pc-windows-msvc |
0 commit comments