fix(release): align release process guard contract #2848
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: Desktop Checks | |
| on: | |
| push: | |
| branches: main | |
| pull_request: | |
| branches: main | |
| concurrency: | |
| group: desktop-checks-${{ github.event.pull_request.number || github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| changes: | |
| name: Detect Changes | |
| runs-on: ubuntu-latest | |
| outputs: | |
| diff_base: ${{ steps.changes.outputs.diff_base }} | |
| has_desktop_agent_runtime: ${{ steps.changes.outputs.has_desktop_agent_runtime }} | |
| has_desktop_rust: ${{ steps.changes.outputs.has_desktop_rust }} | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v7 | |
| with: | |
| fetch-depth: 0 | |
| - name: Detect changed paths | |
| id: changes | |
| uses: ./.github/actions/detect-changes | |
| rust-backend: | |
| name: Rust Backend | |
| runs-on: ubuntu-latest | |
| needs: changes | |
| if: needs.changes.outputs.has_desktop_rust == 'true' | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v7 | |
| with: | |
| fetch-depth: 0 | |
| - name: Save changed files | |
| run: | | |
| scripts/changed-files "${{ needs.changes.outputs.diff_base }}"...HEAD > /tmp/changed-files.txt | |
| cat /tmp/changed-files.txt | |
| - name: Set up desktop Rust toolchain | |
| run: | | |
| cd desktop/macos/Backend-Rust | |
| rustup show | |
| - name: Cache desktop Rust backend build | |
| uses: actions/cache@v6 | |
| with: | |
| path: | | |
| ~/.cargo/registry | |
| ~/.cargo/git | |
| desktop/macos/Backend-Rust/target | |
| key: ${{ runner.os }}-desktop-rust-${{ hashFiles('desktop/macos/Backend-Rust/Cargo.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-desktop-rust- | |
| - name: Check desktop Rust backend | |
| run: | | |
| FILES=$(while IFS= read -r file; do | |
| if [[ "$file" =~ ^desktop/macos/Backend-Rust/.*\.rs$ ]] && [ -f "$file" ]; then | |
| echo "${file#desktop/macos/Backend-Rust/}" | |
| fi | |
| done < /tmp/changed-files.txt) | |
| if [ -n "$FILES" ]; then | |
| ( | |
| cd desktop/macos/Backend-Rust | |
| printf '%s\n' "$FILES" | xargs -d '\n' rustfmt --edition 2021 --check | |
| ) | |
| fi | |
| cd desktop/macos/Backend-Rust | |
| cargo check --locked | |
| agent-runtime: | |
| name: Agent Runtime | |
| runs-on: ubuntu-latest | |
| needs: changes | |
| if: needs.changes.outputs.has_desktop_agent_runtime == 'true' | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v7 | |
| with: | |
| fetch-depth: 0 | |
| - name: Setup Node.js for desktop agent runtime | |
| uses: actions/setup-node@v7 | |
| with: | |
| node-version: '22' | |
| cache: 'npm' | |
| cache-dependency-path: | | |
| desktop/macos/agent/package-lock.json | |
| desktop/macos/pi-mono-extension/package-lock.json | |
| - name: Check desktop agent runtime | |
| run: desktop/macos/scripts/test-tool-surfaces.sh |