| name: Desktop (Linux) |
|
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| on: |
| workflow_dispatch: |
| pull_request: |
| paths: |
| - .github/workflows/desktop-linux.yml |
| - electron/** |
| - electron-builder.config.mjs |
| - scripts/download-uv.mjs |
| - scripts/download-node.mjs |
| release: |
| types: [published] |
|
|
| concurrency: |
| group: desktop-linux-${{ github.ref }} |
| cancel-in-progress: ${{ github.event_name == 'pull_request' }} |
|
|
| |
| |
| permissions: |
| contents: write |
|
|
| jobs: |
| build-packages: |
| name: Build Linux packages |
| runs-on: ubuntu-latest |
| timeout-minutes: 30 |
|
|
| steps: |
| - name: Check out repository |
| uses: actions/checkout@v7 |
|
|
| - name: Set up Node.js with npm cache |
| uses: actions/setup-node@v7 |
| with: |
| node-version: '24' |
| cache: npm |
|
|
| - name: Install dependencies |
| run: npm ci |
|
|
| - name: Build Linux packages |
| env: |
| |
| |
| |
| |
| VITE_POSTHOG_API_KEY: ${{ github.event_name == 'release' && vars.POSTHOG_PROD_KEY || vars.POSTHOG_STAGING_KEY }} |
| |
| |
| GITHUB_TOKEN: ${{ github.token }} |
| run: npm run build:desktop |
|
|
| - name: Verify package output |
| run: | |
| ls -la dist-electron |
| appimage_count=$(find dist-electron -maxdepth 1 -name '*.AppImage' | wc -l | tr -d ' ') |
| deb_count=$(find dist-electron -maxdepth 1 -name '*.deb' | wc -l | tr -d ' ') |
| if [ "$appimage_count" -ne 1 ] || [ "$deb_count" -ne 1 ]; then |
| echo "::error::Expected exactly one AppImage and one deb in dist-electron/, found $appimage_count AppImage(s) and $deb_count deb(s)" |
| exit 1 |
| fi |
| |
| - name: Upload package artifacts |
| uses: actions/upload-artifact@v7 |
| with: |
| name: agent-canvas-linux-packages |
| path: | |
| dist-electron/*.AppImage |
| dist-electron/*.deb |
| if-no-files-found: error |
| |
| |
| retention-days: 14 |
|
|
| - name: Attach packages to GitHub release |
| if: github.event_name == 'release' |
| env: |
| GH_TOKEN: ${{ github.token }} |
| RELEASE_TAG: ${{ github.event.release.tag_name }} |
| run: gh release upload "$RELEASE_TAG" dist-electron/*.AppImage dist-electron/*.deb --clobber |
|
|