Files
Warp/.github/workflows/desktop-release.yml
T
tajniak81andClaude Opus 5.5 829b236efe
CI / Test (ubuntu-latest) (push) Canceled after 0s
CI / Test (windows-latest) (push) Canceled after 0s
CI / Storage tests on PostgreSQL (push) Canceled after 0s
CI / Complement (federation off) (push) Canceled after 0s
CI / golangci-lint (push) Canceled after 0s
CI / Smoke test the binary (push) Canceled after 0s
CI / Admin panel (push) Canceled after 0s
CI / Web client (push) Canceled after 0s
CI / Desktop client (ubuntu-24.04) (push) Canceled after 0s
CI / Desktop client (windows-latest) (push) Canceled after 0s
Desktop: notifications, tray, auto-update, installer; web: sliding sync, voice messages, notifications
Web client (also what the desktop app runs):

- Simplified Sliding Sync (MSC4186) when the homeserver advertises
  org.matrix.simplified_msc3575. src/matrix/sliding.ts answers the SDK's
  GET /sync with a sliding sync request and rewrites the response into
  the /sync shape, as the Android app does; the SDK's own sliding sync
  mode doesn't sort thread replies into threads. 20 rooms first, then
  every room (up to 1000); to_device, e2ee, account data, receipts and
  typing extensions; M_UNKNOWN_POS starts a new connection. The SDK's
  /members?at=<sync token> drops the token, which here is ours. Settings
  can switch back to /sync.
- Notifications for new messages and incoming calls while Warp isn't in
  front, by the account's push rules, evaluated after decryption. The
  browser's Notification API once turned on in Settings, or the desktop
  app's bridge (window.warpDesktop). One per room; a click opens it.
- Voice messages: record from the composer, sent as m.audio with
  MSC3245's voice marker and MSC1767's duration and waveform (encrypted
  in encrypted rooms); a waveform player in the timeline.
- @warp/ui: a slot for extra composer buttons; bell-off, play and pause
  icons.

Desktop app:

- System notifications through Wails' notifications service, fed by
  /_desktop/bridge.js (/_desktop/notify, JSON only); clicking one shows
  the window and opens the room.
- Tray icon with Open and Quit; closing the window hides it (a one-time
  notification says so), File > Quit ends it. The page title goes to
  the window and the tray tooltip, the unread count to the taskbar or
  Dock badge.
- Auto-update from a Wails update manifest at DESKTOP_UPDATE_URL: a quiet
  check a minute after start and every six hours, a notification when a
  newer version exists, Help > Check for updates opens the update window.
  Optional signature key (DESKTOP_UPDATE_KEY). Linux package installs
  leave updates to the package manager. build/manifest writes the
  manifest.
- Per-user NSIS installer (make desktop-windows-installer), the macOS
  bundle zipped for the updater, a desktop CI job, and a Desktop release
  workflow that builds all three platforms and the manifest.

Tested on Windows against a local homeserver: sliding sync with E2EE,
threads and a server restart; notifications (toast history), close to
tray, relaunch restoring the window; voice messages recorded, sent and
played, encrypted too; the update check finding a newer version. Not
tested: installing an update, the NSIS installer, CI, macOS and Linux.
Code signing needs certificates and isn't done.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-19 14:01:02 +02:00

141 lines
4.5 KiB
YAML

name: Desktop release
# Builds the desktop client for Windows, Linux and macOS, the Windows
# installer, the Linux packages and the update manifest, and keeps them as
# one workflow artifact. Publishing is up to you: put the files and
# warp-desktop.json in one directory on a web server, at the URL in the
# DESKTOP_UPDATE_URL repository variable, which the builds check for
# updates.
#
# Start it by pushing a tag desktop-v1.2.3, or by hand with a version.
# Nothing is signed yet: the Windows build shows SmartScreen's warning and
# the macOS one opens only after "Open anyway" (see apps/desktop/README.md).
on:
push:
tags: ["desktop-v*"]
workflow_dispatch:
inputs:
version:
description: Version, e.g. 1.2.3
required: true
permissions:
contents: read
env:
GO_VERSION: "1.26"
DESKTOP_VERSION: ${{ inputs.version || github.ref_name }}
DESKTOP_UPDATE_URL: ${{ vars.DESKTOP_UPDATE_URL }}
jobs:
build:
name: Build (${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- os: windows-latest
goos: windows
- os: ubuntu-24.04
goos: linux
- os: macos-latest
goos: darwin
defaults:
run:
shell: bash
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v4
with:
node-version: 22
cache: pnpm
- uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}
cache-dependency-path: apps/desktop/go.sum
- name: Version
run: |
v="${DESKTOP_VERSION#desktop-v}"
echo "DESKTOP_VERSION=${v#v}" >> "$GITHUB_ENV"
- name: Install the Linux webview and packaging tools
if: runner.os == 'Linux'
run: sudo apt-get update && sudo apt-get install -y libgtk-4-dev libwebkitgtk-6.0-dev
- name: Install
run: pnpm install --frozen-lockfile
- name: Windows binary and installer
if: runner.os == 'Windows'
# The same steps as `make desktop-windows-installer`; the runner has
# NSIS but no make.
run: |
pnpm --filter @warp/web build
(cd apps/desktop && go build -tags production -o ../../bin/warp-desktop.exe \
-ldflags "-X main.version=$DESKTOP_VERSION -X main.appVersion=$DESKTOP_VERSION -X main.updateURL=$DESKTOP_UPDATE_URL -H windowsgui" \
./cmd/warp-desktop)
(cd apps/desktop/build/windows && makensis -V2 -DVERSION="$DESKTOP_VERSION" \
-DEXE=../../../../bin/warp-desktop.exe -DOUT=../../../../bin/warp-desktop-setup.exe installer.nsi)
mkdir -p dist
cp bin/warp-desktop.exe dist/warp-desktop-windows-amd64.exe
cp bin/warp-desktop-setup.exe "dist/warp-desktop-$DESKTOP_VERSION-setup.exe"
- name: Linux binary and packages
if: runner.os == 'Linux'
run: |
make desktop-linux DESKTOP_VERSION="$DESKTOP_VERSION" DESKTOP_UPDATE_URL="$DESKTOP_UPDATE_URL"
mkdir -p dist
cp bin/warp-desktop dist/warp-desktop-linux-amd64
cp bin/*.deb bin/*.rpm bin/*.pkg.tar.zst dist/
- name: macOS app
if: runner.os == 'macOS'
run: |
make desktop-macos DESKTOP_VERSION="$DESKTOP_VERSION" DESKTOP_UPDATE_URL="$DESKTOP_UPDATE_URL"
mkdir -p dist
cp bin/Warp.app.zip dist/Warp-darwin-arm64.app.zip
- uses: actions/upload-artifact@v4
with:
name: desktop-${{ matrix.goos }}
path: dist/
if-no-files-found: error
manifest:
name: Update manifest
needs: build
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}
cache-dependency-path: apps/desktop/go.sum
- uses: actions/download-artifact@v4
with:
pattern: desktop-*
path: dist
merge-multiple: true
- name: Write warp-desktop.json
run: |
v="${DESKTOP_VERSION#desktop-v}"
go -C apps/desktop run ./build/manifest -version "${v#v}" -out "$PWD/dist/warp-desktop.json" \
windows/amd64="$PWD/dist/warp-desktop-windows-amd64.exe" \
linux/amd64="$PWD/dist/warp-desktop-linux-amd64" \
darwin/arm64="$PWD/dist/Warp-darwin-arm64.app.zip"
cat dist/warp-desktop.json
- uses: actions/upload-artifact@v4
with:
name: warp-desktop-release
path: dist/