Merge branch 'main' into xcode26 #297
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 CrossCode" | |
| on: | |
| push: | |
| branches: | |
| - "*" | |
| pull_request: | |
| branches: | |
| - "*" | |
| workflow_dispatch: | |
| release: | |
| types: [published] | |
| jobs: | |
| build: | |
| permissions: | |
| contents: write | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - platform: "ubuntu-22.04" | |
| args: "--bundles deb" | |
| - platform: "ubuntu-22.04" | |
| args: "--bundles rpm" | |
| - platform: "ubuntu-22.04" | |
| args: "--bundles appimage" | |
| - platform: "windows-latest" | |
| args: "" | |
| - platform: "macos-latest" | |
| args: "--target aarch64-apple-darwin" | |
| - platform: "macos-15-intel" | |
| args: "--target x86_64-apple-darwin" | |
| runs-on: ${{ matrix.platform }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Cache Rust and bun dependencies | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.cargo/registry | |
| ~/.cargo/git | |
| src-tauri/target | |
| node_modules | |
| key: ${{ runner.os }}-crosscode-${{ hashFiles('**/Cargo.lock', 'package-lock.json') }} | |
| restore-keys: | | |
| ${{ runner.os }}-crosscode- | |
| - name: Install Rust stable | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| targets: ${{ (matrix.platform == 'macos-latest' || matrix.platform == 'macos-15-intel') && 'aarch64-apple-darwin,x86_64-apple-darwin' || '' }} | |
| - name: Install Linux dependencies | |
| if: matrix.platform == 'ubuntu-22.04' | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf perl make | |
| - name: Add MSVC to PATH | |
| if: matrix.platform == 'windows-latest' | |
| uses: ilammy/msvc-dev-cmd@v1 | |
| - name: Install Perl and Make for Windows | |
| if: matrix.platform == 'windows-latest' | |
| run: | | |
| choco install strawberryperl make --no-progress | |
| - uses: oven-sh/setup-bun@v2 | |
| with: | |
| bun-version: latest | |
| - name: Install frontend dependencies | |
| run: bun i --frozen-lockfile | |
| - name: Clean old bundles | |
| if: matrix.platform != 'macos-latest' && matrix.platform != 'macos-15-intel' | |
| run: bunx rimraf src-tauri/target/release/bundle | |
| - name: Clean old bundles | |
| if: matrix.platform == 'macos-latest' | |
| run: bunx rimraf src-tauri/target/aarch64-apple-darwin/release/bundle | |
| - name: Clean old bundles | |
| if: matrix.platform == 'macos-15-intel' | |
| run: bunx rimraf src-tauri/target/x86_64-apple-darwin/release/bundle | |
| - name: Build | |
| uses: tauri-apps/tauri-action@v0 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY }} | |
| TAURI_SIGNING_PRIVATE_KEY_PASSWORD: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY_PASSWORD }} | |
| with: | |
| args: ${{ matrix.args }} | |
| includeUpdaterJson: ${{ github.event_name == 'release' }} | |
| releaseId: ${{ github.event_name == 'release' && github.event.release.id || '' }} | |
| - name: Upload macOS DMG | |
| uses: actions/upload-artifact@v4 | |
| if: matrix.platform == 'macos-latest' || matrix.platform == 'macos-15-intel' | |
| with: | |
| name: macos-dmg-${{ matrix.args == '--target aarch64-apple-darwin' && 'arm64' || 'x64' }} | |
| path: ${{ github.workspace }}/src-tauri/target/**/release/bundle/**/*.dmg | |
| - name: Upload Linux DEB | |
| uses: actions/upload-artifact@v4 | |
| if: matrix.platform == 'ubuntu-22.04' && matrix.args == '--bundles deb' | |
| with: | |
| name: linux-deb | |
| path: ${{ github.workspace }}/src-tauri/target/release/bundle/**/*.deb | |
| - name: Upload Linux RPM | |
| uses: actions/upload-artifact@v4 | |
| if: matrix.platform == 'ubuntu-22.04' && matrix.args == '--bundles rpm' | |
| with: | |
| name: linux-rpm | |
| path: ${{ github.workspace }}/src-tauri/target/release/bundle/**/*.rpm | |
| - name: Upload Linux AppImage | |
| uses: actions/upload-artifact@v4 | |
| if: matrix.platform == 'ubuntu-22.04' && matrix.args == '--bundles appimage' | |
| with: | |
| name: linux-appimage | |
| path: ${{ github.workspace }}/src-tauri/target/release/bundle/**/*.AppImage | |
| - name: Upload Windows EXE | |
| uses: actions/upload-artifact@v4 | |
| if: matrix.platform == 'windows-latest' | |
| with: | |
| name: windows-exe | |
| path: | | |
| ${{ github.workspace }}/src-tauri/target/release/bundle/**/*.exe |