feat(desktop, analytics): add packaging and usage export #7
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-build | |
| on: | |
| workflow_dispatch: | |
| pull_request: | |
| paths: | |
| - 'src-tauri/**' | |
| - 'tools/desktop/**' | |
| - 'web-ui/**' | |
| - 'cli.js' | |
| - 'cli/**' | |
| - 'lib/**' | |
| - 'plugins/**' | |
| - 'package.json' | |
| - 'package-lock.json' | |
| - '.github/workflows/desktop-build.yml' | |
| permissions: | |
| contents: read | |
| jobs: | |
| tauri: | |
| name: ${{ matrix.name }} | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - name: macOS | |
| os: macos-latest | |
| - name: Windows | |
| os: windows-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup Node | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '22' | |
| cache: npm | |
| - name: Setup Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Verify npm package payload | |
| run: npm pack --dry-run --json | |
| - name: Stage desktop runtime resources | |
| run: npm run desktop:stage | |
| - name: Build desktop app | |
| run: npm run desktop:build | |
| - name: Upload desktop bundles | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: codexmate-desktop-${{ matrix.name }} | |
| path: src-tauri/target/release/bundle/** | |
| if-no-files-found: error |