Release v2.0.6 #25
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 macOS | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| branch: | |
| description: 'Branch to build from' | |
| required: false | |
| default: 'main' | |
| type: string | |
| push: | |
| tags: | |
| - 'v*' | |
| permissions: | |
| contents: write | |
| jobs: | |
| build-macos: | |
| timeout-minutes: 30 | |
| runs-on: macos-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| ref: ${{ github.event.inputs.branch || github.ref }} | |
| - name: Setup Node | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: lts/* | |
| cache: 'npm' | |
| - name: Setup Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| targets: aarch64-apple-darwin | |
| - name: Rust cache | |
| uses: swatinem/rust-cache@v2 | |
| with: | |
| workspaces: './src-rust -> target' | |
| key: macos | |
| - name: Install frontend dependencies | |
| run: npm ci | |
| - name: Run Rust tests | |
| run: cargo test --manifest-path src-rust/Cargo.toml | |
| - name: Build Rust sidecar | |
| run: cargo build --release --manifest-path src-rust/Cargo.toml | |
| - name: Run frontend tests | |
| run: npm test | |
| - name: Build frontend | |
| run: npm run build | |
| - name: Build Electron main | |
| run: npm run build:electron | |
| - name: Package with electron-builder | |
| run: npx electron-builder --mac dmg | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Upload DMG | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: macos-dmg-unsigned | |
| path: release/*.dmg | |
| - name: Upload to GitHub Release | |
| if: startsWith(github.ref, 'refs/tags/') | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| files: release/*.dmg | |
| fail_on_unmatched_files: false |