Bump vite from 7.3.1 to 8.0.1 #173
Workflow file for this run
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: Build Desktop App | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: | |
| - master | |
| pull_request: | |
| branches: | |
| - master | |
| permissions: | |
| contents: read | |
| attestations: write | |
| id-token: write | |
| jobs: | |
| build-desktop: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - os: windows-latest | |
| platform: windows | |
| binary_glob: "*.exe" | |
| - os: ubuntu-latest | |
| platform: linux | |
| binary_glob: "pick-a-game-desktop" | |
| - os: macos-latest | |
| platform: macos | |
| binary_glob: "pick-a-game-desktop" | |
| runs-on: ${{ matrix.os }} | |
| env: | |
| WINDOWS_CERT_BASE64: ${{ secrets.WINDOWS_CERT_BASE64 }} | |
| WINDOWS_CERT_PASSWORD: ${{ secrets.WINDOWS_CERT_PASSWORD }} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Install Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| - name: Install Linux desktop dependencies | |
| if: ${{ matrix.platform == 'linux' }} | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y libwebkit2gtk-4.1-dev libgtk-3-dev libayatana-appindicator3-dev librsvg2-dev libxdo-dev | |
| - name: Cache Cargo | |
| uses: Swatinem/rust-cache@v2 | |
| with: | |
| workspaces: apps/desktop | |
| - name: Build | |
| run: cargo build --release | |
| working-directory: apps/desktop | |
| - name: Sign executable (optional) | |
| if: ${{ matrix.platform == 'windows' && startsWith(github.ref, 'refs/tags/') && env.WINDOWS_CERT_BASE64 != '' && env.WINDOWS_CERT_PASSWORD != '' }} | |
| continue-on-error: true | |
| shell: pwsh | |
| run: | | |
| $exe = Get-ChildItem apps/desktop/target/release/*.exe | Select-Object -First 1 | |
| if (-not $exe) { throw "No executable found to sign." } | |
| $signtool = (Get-Command signtool.exe -ErrorAction SilentlyContinue).Source | |
| if (-not $signtool) { | |
| $signtool = Get-ChildItem "C:\Program Files (x86)\Windows Kits\10\bin\*\x64\signtool.exe" -ErrorAction SilentlyContinue | | |
| Sort-Object FullName -Descending | | |
| Select-Object -First 1 -ExpandProperty FullName | |
| } | |
| if (-not $signtool) { | |
| Write-Warning "signtool.exe not found on runner. Skipping optional signing." | |
| exit 0 | |
| } | |
| $certPath = Join-Path $env:RUNNER_TEMP "codesign.pfx" | |
| [IO.File]::WriteAllBytes($certPath, [Convert]::FromBase64String($env:WINDOWS_CERT_BASE64)) | |
| & $signtool sign /fd SHA256 /f $certPath /p $env:WINDOWS_CERT_PASSWORD /tr http://timestamp.digicert.com /td SHA256 $exe.FullName | |
| - name: Generate checksums | |
| shell: pwsh | |
| run: | | |
| $out = "apps/desktop/target/release/SHA256SUMS.txt" | |
| $files = Get-ChildItem "apps/desktop/target/release/${{ matrix.binary_glob }}" | |
| if (-not $files) { throw "No binaries found matching ${{ matrix.binary_glob }}." } | |
| $lines = $files | ForEach-Object { | |
| $hash = (Get-FileHash $_.FullName -Algorithm SHA256).Hash.ToLower() | |
| "$hash *$($_.Name)" | |
| } | |
| $lines | Set-Content -Path $out -Encoding ascii | |
| - name: Attest build provenance | |
| if: ${{ github.event_name != 'pull_request' }} | |
| uses: actions/attest-build-provenance@v4 | |
| with: | |
| subject-path: | | |
| apps/desktop/target/release/${{ matrix.binary_glob }} | |
| apps/desktop/target/release/SHA256SUMS.txt | |
| - name: Upload executable + checksums | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: pick-a-game-desktop-${{ matrix.platform }}-${{ github.run_number }} | |
| path: | | |
| apps/desktop/target/release/${{ matrix.binary_glob }} | |
| apps/desktop/target/release/SHA256SUMS.txt | |