Build & Upload MacOS Artifacts #6
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 & Upload Artifacts | |
| on: | |
| workflow_dispatch: | |
| jobs: | |
| build: | |
| runs-on: macos-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup Node | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| cache: npm | |
| - name: Cache deps | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.cache/electron | |
| ~/.cache/electron-builder | |
| node_modules | |
| key: macos-electron-${{ hashFiles('package-lock.json') }} | |
| - name: Install deps | |
| run: npm ci | |
| - name: Build renderer (Vite) | |
| run: npx cross-env ELECTRON_DIST=1 vite build | |
| - name: Build macOS | |
| run: npm run dist:mac | |
| - name: Upload macOS artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: macos-artifacts | |
| path: | | |
| dist/*.dmg | |
| dist/*.zip |