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/