Skip to content

A team of long-lived bots for DeepSeek Harness, with main bots, bot-to-bot messages and group chats.

Build and check the Linux packages in CI

klarkxy94f64a1ce604
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index dc162e1d..d2ce404d 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -1,8 +1,9 @@
name: Release
# Publishes ds-bot to npm when a GitHub release is published, then attaches the desktop app's
-# Windows installer and macOS zips to the release. Windows updates from latest.yml; macOS opens
-# the release page for a manual download.
+# Windows installer, macOS zips and Linux packages to the release. Windows and the Linux
+# AppImage update from latest.yml / latest-linux.yml; macOS and the Linux deb open the release
+# page for a manual download.
#
# npm Trusted Publishing: npm trusts this workflow through GitHub's OIDC token, so the
# repository keeps no npm token, and every version gets a provenance statement. It is set
@@ -181,3 +182,46 @@ jobs:
run: |
zip="dist-pack/DeepSeek-Bot-$(node -p "require('./package.json').version")-mac-${{ matrix.arch }}.zip"
gh release upload "$TAG" "$zip" --clobber
+
+ app-linux:
+ name: Desktop app packages (Linux x64)
+ needs: publish
+ runs-on: ubuntu-latest
+ timeout-minutes: 30
+ defaults:
+ run:
+ shell: bash
+ working-directory: app
+ steps:
+ - uses: actions/checkout@v4
+ - uses: actions/setup-node@v4
+ with:
+ node-version: 24
+ - run: npm ci --no-fund --no-audit
+ - run: npm run dist
+ - name: Check the packaged app
+ # Ubuntu 24.04's AppArmor blocks the unprivileged user namespaces that Chromium's
+ # sandbox needs; the release runner may lift that restriction (it is its own machine).
+ run: |
+ sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0
+ xvfb-run -a node scripts/check-packed.mjs
+ - name: Keep the packages for real-device checks
+ if: github.event_name == 'workflow_dispatch'
+ uses: actions/upload-artifact@v4
+ with:
+ name: DeepSeek-Bot-linux-x64
+ path: |
+ app/dist-pack/DeepSeek-Bot-*-linux-x86_64.AppImage
+ app/dist-pack/DeepSeek-Bot-*-linux-amd64.deb
+ retention-days: 7
+ if-no-files-found: error
+ compression-level: 0
+ - name: Attach the packages to the release
+ if: github.event_name == 'release'
+ env:
+ GH_TOKEN: ${{ github.token }}
+ TAG: ${{ github.event.release.tag_name }}
+ run: |
+ version="$(node -p "require('./package.json').version")"
+ appimage="dist-pack/DeepSeek-Bot-$version-linux-x86_64.AppImage"
+ gh release upload "$TAG" "$appimage" "$appimage.blockmap" "dist-pack/DeepSeek-Bot-$version-linux-amd64.deb" dist-pack/latest-linux.yml --clobber
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
index 4864a541..b0953c36 100644
--- a/.github/workflows/test.yml
+++ b/.github/workflows/test.yml
@@ -222,6 +222,75 @@ jobs:
node scripts/check-packed.mjs "$exe"
node scripts/check-update.mjs "$exe" 99.0.0
+ app-package-linux:
+ name: Desktop app package (Linux x64)
+ runs-on: ubuntu-latest
+ timeout-minutes: 45
+ defaults:
+ run:
+ shell: bash
+ working-directory: app
+ steps:
+ - uses: actions/checkout@v4
+ with:
+ fetch-depth: 0
+ - uses: actions/setup-node@v4
+ with:
+ node-version: 24
+ - run: npm ci --no-fund --no-audit
+ - run: npm run dist
+ - name: Check the packages
+ run: |
+ version="$(node -p "require('./package.json').version")"
+ test -f "dist-pack/DeepSeek-Bot-$version-linux-x86_64.AppImage"
+ test -f "dist-pack/DeepSeek-Bot-$version-linux-amd64.deb"
+ test -f dist-pack/latest-linux.yml
+ # An AppImage mounts through FUSE 2, and Ubuntu 24.04's AppArmor blocks the unprivileged
+ # user namespaces that Chromium's sandbox needs; a throwaway runner may lift that.
+ - name: Prepare to run the app
+ run: |
+ sudo apt-get update -qq && sudo apt-get install -y -qq libfuse2t64 xvfb
+ sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0
+ - name: Check the packaged app
+ run: xvfb-run -a node scripts/check-packed.mjs
+ # apt-get, not dpkg: it also installs the deb's dependencies.
+ - name: Install the deb and check
+ run: |
+ version="$(node -p "require('./package.json').version")"
+ sudo apt-get install -y "dist-pack/DeepSeek-Bot-$version-linux-amd64.deb"
+ test -f /usr/share/applications/deepseek-bot.desktop
+ xvfb-run -a node scripts/check-packed.mjs "/opt/DeepSeek Bot/deepseek-bot"
+ # A deb cannot update itself: it points at the release page, as on macOS.
+ - name: The deb's app hears of a new version
+ run: xvfb-run -a node scripts/check-update.mjs "/opt/DeepSeek Bot/deepseek-bot" 99.0.0
+ # The update builds the app a second time, so it runs only for changes to the app or the
+ # workflows. The AppImage downloads the new one and replaces itself as it quits.
+ - name: Does the change touch the app?
+ id: scope
+ run: |
+ if [ "$GITHUB_EVENT_NAME" != pull_request ] || git diff --name-only "origin/$GITHUB_BASE_REF...HEAD" | grep -qE '^(app/|\.github/workflows/)'; then
+ echo "update=true" >> "$GITHUB_OUTPUT"
+ fi
+ - name: Build the next version
+ if: steps.scope.outputs.update == 'true'
+ run: |
+ next="$(node -p "const [a, b, c] = require('./package.json').version.split(/[.-]/u); [a, b, Number(c) + 1].join('.')")"
+ npx electron-builder --publish never -c.extraMetadata.version="$next" -c.directories.output=dist-next
+ - name: The AppImage takes the update
+ if: steps.scope.outputs.update == 'true'
+ run: |
+ tmp="$(mktemp -d)"
+ cp dist-pack/DeepSeek-Bot-*-linux-x86_64.AppImage "$tmp/deepseek-bot.AppImage"
+ chmod +x "$tmp/deepseek-bot.AppImage"
+ xvfb-run -a node scripts/check-update.mjs "$tmp/deepseek-bot.AppImage" dist-next
+ pkill -f "$tmp/deepseek-bot" || true
+ next="$(ls dist-next/DeepSeek-Bot-*-linux-x86_64.AppImage)"
+ test "$(sha512sum "$tmp/deepseek-bot.AppImage" | cut -d' ' -f1)" = "$(sha512sum "$next" | cut -d' ' -f1)"
+ - name: Uninstall
+ run: |
+ sudo apt-get remove -y deepseek-bot
+ test ! -e "/opt/DeepSeek Bot/deepseek-bot"
+
docker:
name: Docker startup and data migration
runs-on: ubuntu-latest
@@ -266,8 +335,8 @@ jobs:
# and fails unless the matrix, leak scan, app, app package and Docker checks passed.
result:
name: Test result
- needs: [test, scan, app, app-package, app-package-macos, docker]
+ needs: [test, scan, app, app-package, app-package-macos, app-package-linux, docker]
if: always()
runs-on: ubuntu-latest
steps:
- - run: test "${{ needs.test.result }}" = success && test "${{ needs.scan.result }}" = success && test "${{ needs.app.result }}" = success && test "${{ needs.app-package.result }}" = success && test "${{ needs.app-package-macos.result }}" = success && test "${{ needs.docker.result }}" = success
+ - run: test "${{ needs.test.result }}" = success && test "${{ needs.scan.result }}" = success && test "${{ needs.app.result }}" = success && test "${{ needs.app-package.result }}" = success && test "${{ needs.app-package-macos.result }}" = success && test "${{ needs.app-package-linux.result }}" = success && test "${{ needs.docker.result }}" = success