-
Notifications
You must be signed in to change notification settings - Fork 2
Fix release packaging for macOS and Linux #290
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 3 commits
e899f78
a103206
7aa675c
7005316
86e210b
fc65a2b
1ac713a
92e6cc4
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,9 +1,8 @@ | ||
| # Release workflow (macOS desktop + CLI) | ||
| # Release workflow (macOS + Linux desktop + CLI) | ||
| # | ||
| # Builds and publishes the macOS Electron app via GitHub Releases. | ||
| # Builds and publishes Electron desktop artifacts via GitHub Releases. | ||
| # electron-updater reads latest-mac.yml from the release assets to deliver | ||
| # auto-updates. Linux desktop packaging is intentionally disabled until the | ||
| # native packaged runtime and bundled agent CLIs are staged for Linux. | ||
| # auto-updates. | ||
| # | ||
| # Trigger: GitHub Actions UI → "Run workflow" → pick bump type | ||
| # Or CLI: gh workflow run release.yml -f bump=patch | ||
|
|
@@ -320,9 +319,76 @@ jobs: | |
| dist-electron/latest-mac.yml | ||
| if-no-files-found: error | ||
|
|
||
| # ── Step 2b: Build Linux (x64) ───────────────────────────────────── | ||
| build-linux: | ||
| needs: validate-and-bump | ||
| runs-on: ubuntu-latest | ||
| timeout-minutes: 35 | ||
| env: | ||
| SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| with: | ||
| ref: ${{ inputs.dry_run == false && needs.validate-and-bump.outputs.tag || github.ref }} | ||
|
|
||
| - uses: oven-sh/setup-bun@v2 | ||
| with: | ||
| bun-version: ${{ env.BUN_VERSION }} | ||
|
|
||
| - name: Verify Bun version pin | ||
| run: | | ||
| package_manager="$(sed -nE 's/.*"packageManager": "bun@([^"]+)".*/\1/p' package.json)" | ||
| if [[ "$package_manager" != "$BUN_VERSION" ]]; then | ||
| echo "::error::release workflow BUN_VERSION=$BUN_VERSION but package.json packageManager=bun@$package_manager" | ||
| exit 1 | ||
| fi | ||
|
|
||
| - uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: 22 | ||
|
|
||
| - name: Install dependencies | ||
| run: bun install --frozen-lockfile | ||
|
|
||
| - name: Typecheck runtime surfaces | ||
| run: | | ||
| bun run typecheck | ||
| bun run typecheck:backend | ||
| bun run typecheck:agent-server | ||
|
|
||
| - name: Package Linux (x64) | ||
| run: | | ||
| bun run build:all | ||
| bun run validate:runtime | ||
| bun run smoke:runtime-source | ||
| bunx electron-builder --linux --publish never | ||
|
|
||
|
coderabbitai[bot] marked this conversation as resolved.
|
||
| - name: Verify Linux artifacts | ||
| run: | | ||
| set -euo pipefail | ||
| test -f dist-electron/Deus-*.AppImage | ||
| test -f dist-electron/deus_*_amd64.deb | ||
| test -x dist-electron/linux-unpacked/resources/bin/deus-runtime | ||
| test -x dist-electron/linux-unpacked/resources/bin/codex | ||
| test -x dist-electron/linux-unpacked/resources/bin/claude | ||
| test -x dist-electron/linux-unpacked/resources/bin/gh | ||
| test -x dist-electron/linux-unpacked/resources/bin/rg | ||
| test -x dist-electron/linux-unpacked/resources/bin/agent-browser | ||
| file dist-electron/linux-unpacked/resources/bin/deus-runtime | grep 'ELF 64-bit' | ||
|
|
||
| - name: Upload Linux artifacts | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: linux-artifacts | ||
| path: | | ||
| dist-electron/*.AppImage | ||
| dist-electron/*.deb | ||
| dist-electron/latest-linux.yml | ||
| if-no-files-found: error | ||
|
|
||
| # ── Step 3: Stage a draft GitHub Release with all artifacts ───────── | ||
| create-release: | ||
| needs: [validate-and-bump, build-macos] | ||
| needs: [validate-and-bump, build-macos, build-linux] | ||
| if: ${{ inputs.dry_run == false }} | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
|
|
@@ -334,7 +400,7 @@ jobs: | |
| run: | | ||
| mkdir -p release | ||
| find artifacts -type f \( \ | ||
| -name "*.dmg" -o -name "*.zip" -o \ | ||
| -name "*.dmg" -o -name "*.zip" -o -name "*.AppImage" -o -name "*.deb" -o \ | ||
| -name "*.blockmap" -o -name "*.yml" \ | ||
| \) -exec cp {} release/ \; | ||
| echo "=== Release files ===" | ||
|
|
@@ -402,7 +468,7 @@ jobs: | |
|
|
||
| - name: Publish to npm | ||
| working-directory: apps/cli | ||
| run: npm publish --access public --provenance | ||
| run: bun publish --access public | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
This replaces the previous Useful? React with 👍 / 👎.
Owner
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Declined intentionally. The repo instructions require Bun for package operations and explicitly say never npm/yarn; local |
||
| env: | ||
| NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -33,7 +33,7 @@ | |
| "package:mac": "bun run build:all && electron-builder --mac", | ||
| "package:mac:dir": "node scripts/runtime/package-mac-dir.cjs", | ||
| "package:win": "node scripts/runtime/unsupported-packaged-platform.cjs Windows", | ||
| "package:linux": "node scripts/runtime/unsupported-packaged-platform.cjs Linux", | ||
| "package:linux": "bun run build:all && electron-builder --linux", | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Enabling Useful? React with 👍 / 👎.
Owner
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fixed in 92e6cc4. Packaged startup now permits |
||
| "postinstall": "bun run prepare:device-use", | ||
| "native:electron": "electron-builder install-app-deps", | ||
| "native:node": "cd node_modules/better-sqlite3 && node ../node-gyp/bin/node-gyp.js rebuild", | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On the new Ubuntu release job this smoke runs after staging the Linux CLIs, but the source runtime only treats
darwin-arm64/darwin-x64as dev-staged runtime keys (apps/runtime/index.tsandshared/lib/cli-path.tsnever returnlinux-x64). As a resultsmoke:runtime-sourcestartsagent-serverwithoutDEUS_BUNDLED_BIN_DIR, cannot emit the required bundledclaude/codexpaths, and the Linux release job times out/fails before packaging can be uploaded.Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in 92e6cc4. Source-runtime CLI discovery now recognizes
linux-x64in bothapps/runtime/index.tsandshared/lib/cli-path.ts; the shared CLI path test covers staged Linux dev binaries.