Skip to content

feat(release): publish Linux .deb and .rpm alongside the AppImage - #4071

Open
chukfinley wants to merge 3 commits into
pingdotgg:mainfrom
chukfinley:feat/linux-deb-packaging
Open

feat(release): publish Linux .deb and .rpm alongside the AppImage#4071
chukfinley wants to merge 3 commits into
pingdotgg:mainfrom
chukfinley:feat/linux-deb-packaging

Conversation

@chukfinley

@chukfinley chukfinley commented Jul 17, 2026

Copy link
Copy Markdown

Closes #298.

One open question

Maintainer: is a mandatory Debian control field, so the deb target needs an address. I used hello@t3.tools as a placeholder — I have no way to know which mailbox you want on it, and I did not want to quietly invent one that bounces. Tell me the right address and I'll amend; it is a single string.

Why this is smaller than you'd expect

--target deb already works. createBuildConfig passes the target straight through to electron-builder, and the artifact copy step is target-agnostic. Nothing in the pipeline needs restructuring.

A deb build fails today for exactly one reason: app-builder-lib's FpmTarget requires two metadata fields the staged package.json omits. AppImage needs neither, so nothing ever surfaced it:

// app-builder-lib/out/targets/FpmTarget.js
if (projectUrl == null) {
  errors.push("Please specify project homepage, ...")
}
let author = options.maintainer
if (author == null) {
  const a = packager.info.metadata.author
  if (a == null || a.email == null) {
    errors.push(errorMessages.authorEmailIsMissed)   // author is "T3 Tools", no email
  } else {
    author = `${a.name} <${a.email}>`
  }
}
if (errors.length > 0) throw new Error(errors.join("\n\n"))

Add homepage, add maintainer. That is the feature.

The artifact-name collision

#1655 was closed partly because "the artifact-name collision remains unresolved". That collision is a consequence of adding a second Linux matrix entry: the upload step names artifacts desktop-${{ matrix.platform }}-${{ matrix.arch }}, so a linux/deb/x64 entry produces desktop-linux-x64 — the same name the AppImage entry already uses. upload-artifact then fails.

This PR adds no matrix entry. The existing Linux entry builds both targets in one electron-builder run (target: AppImage,deb), so there is one artifact name, one runner, and no collision by construction. The output files don't collide either — artifactName's ${ext} already separates .AppImage from .deb.

Side effect: no extra runner and no second full desktop build, so release wall-clock is unchanged.

rpm

.rpm ships from the same job. It needs no code beyond what the deb target already required — same FpmTarget, same homepage/maintainer, and the rpm dependency list sits next to the deb one — so the Linux job builds AppImage,deb,rpm in one electron-builder run and *.rpm joins *.deb in the collect step and both upload lists.

electron-builder shells out to rpmbuild for this. The Ubuntu 24.04 runner image ships it in the rpm package (4.18.2), so the added step is a no-op there; it installs the package only if the binary is missing, so the target survives an image change.

Changes

File Change
scripts/build-desktop-artifact.ts Add homepage + maintainer; split target on commas so one Linux run can emit several targets; declare Electron's shared-library depends per package format (deb and rpm).
scripts/build-desktop-artifact.test.ts Cover the comma split, the maintainer format, and that deb/rpm sections only appear for the formats actually built.
.github/workflows/release.yml Linux matrix builds AppImage,deb,rpm; add *.deb and *.rpm to the collect step and to both release upload lists; ensure rpmbuild is present.
package.json dist:desktop:deb and dist:desktop:rpm, each with :arm64/:x64 variants, matching the existing dist:desktop:dmg/:win families (bare script uses host arch).
docs/internals/scripts.md, docs/operations/release.md Document the new scripts, the comma-separated target, and that the .deb is not an updater payload.
apps/marketing/src/pages/download.astro .deb card on the download page (amd64.deb asset suffix).

Note the two softprops/action-gh-release blocks (first-release and subsequent-release) each carry their own file list — both needed *.deb, otherwise the package builds and never ships.

Verification

Built on Ubuntu 24.04, x64, from this branch:

$ vp run dist:desktop:artifact --platform linux --target AppImage,deb --arch x64 \
    --build-version 0.0.29-nightly.20260716.825

[desktop-artifact] Done. Artifacts:
  T3-Code-0.0.29-nightly.20260716.825-amd64.deb          (194 MB)
  T3-Code-0.0.29-nightly.20260716.825-x86_64.AppImage    (256 MB)

$ dpkg -I T3-Code-0.0.29-nightly.20260716.825-amd64.deb
 Package: t3code
 Version: 0.0.29~nightly.20260716.825
 Architecture: amd64
 Maintainer: T3 Tools <hello@t3.tools>
 Installed-Size: 757008
 Depends: libgtk-3-0, libnotify4, libnss3, libxss1, libxtst6, xdg-utils,
          libatspi2.0-0, libuuid1, libsecret-1-0
 Recommends: libappindicator3-1
 Homepage: https://github.com/pingdotgg/t3code
 Description: T3 Code desktop build

dpkg -c shows the executable at /opt/T3 Code*/t3code and the .desktop entry at /usr/share/applications/t3code.desktop. Installs and launches via sudo apt install ./T3-Code-*-amd64.deb.

Consolidation with the other .deb PRs

There were four overlapping PRs for this (#4071, #4887, #4900, #5139). Per the discussion in #5139 this one now folds in the parts that were missing here, so there is a single PR to review:

Credit to them for those pieces; happy to consolidate the other way round instead if a maintainer prefers one of the other PRs as the base — the point is one PR, not this PR.

Not included, deliberately:

  • No headless /usr/bin/t3 launcher. feat(packaging): add deb and rpm desktop targets #5139 has one; it is an entrypoint change rather than packaging metadata — it changes what lands on users' PATH — so it deserves its own review. @bigpod98 agreed to split it out.
  • No arm64. Linux arm64 is absent from the release matrix entirely today, AppImage included. The build script already handles it (dist:desktop:deb:arm64, dist:desktop:rpm:arm64 build locally), but shipping it needs a second matrix entry on an arm64 runner — a cost decision only a maintainer can make. Follow-up PR, happy to write it.

Verification of this revision

  • rebased onto current main, no conflicts
  • vitest run scripts/build-desktop-artifact.test.ts — 32 passed
  • vp lint on the touched scripts — clean; astro check on apps/marketing — 0 errors

Note

Medium Risk
Changes the release artifact matrix and GitHub Release file matching (fail_on_unmatched_files), so a failed rpm/deb build blocks shipping; packaging metadata uses a placeholder maintainer email pending confirmation.

Overview
Linux desktop releases now emit AppImage, .deb, and .rpm from the existing single Linux matrix job by passing a comma-separated AppImage,deb,rpm target—avoiding a second runner and duplicate artifact names.

The desktop packager gains resolveLinuxTargets, staged homepage / maintainer metadata required by electron-builder’s deb/rpm targets, and per-format depends lists; CI installs rpmbuild when needed and attaches *.deb / *.rpm to GitHub Releases. Local dist:desktop:deb / rpm scripts, docs, tests, and a marketing .deb download card follow the same packaging story.

Linux in-app auto-update stays AppImage-only; deb/rpm installs are expected to upgrade via the system package manager.

Reviewed by Cursor Bugbot for commit 6815958. Bugbot is set up for automated code reviews on this repo. Configure here.

Note

Publish Linux .deb and .rpm packages alongside AppImage in releases

  • The release workflow now builds AppImage,deb,rpm in a single Linux x64 run, installs rpmbuild on the runner when needed, and uploads .deb/.rpm files as release assets alongside the AppImage.
  • scripts/build-desktop-artifact.ts gains resolveLinuxTargets to parse comma-separated target strings, and conditionally injects deb.depends/rpm.depends, maintainer, homepage, and other metadata into the Tauri build config.
  • New dist:desktop:deb and dist:desktop:rpm npm scripts (including arm64/x64 variants) allow local builds of each format.
  • The marketing downloads page adds a .deb download card for Debian/Ubuntu (x86_64).
  • Behavioral Change: Linux in-app auto-updates remain AppImage-only; .deb and .rpm are shipped in the release but are not updater payloads.

Macroscope summarized 6815958.

@coderabbitai

coderabbitai Bot commented Jul 17, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: e0a7767d-84ed-45e1-bd48-22aa3f986447

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions github-actions Bot added vouch:unvouched PR author is not yet trusted in the VOUCHED list. size:S 10-29 changed lines (additions + deletions). labels Jul 17, 2026
macroscopeapp[bot]
macroscopeapp Bot previously approved these changes Jul 17, 2026
@macroscopeapp

macroscopeapp Bot commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Needs human review

This PR introduces new Linux distribution formats (.deb and .rpm) that will be published to end users, modifying the release workflow significantly. Changes to release infrastructure and new user-facing artifacts warrant human review.

You can customize Macroscope's approvability policy. Learn more.

@LouisDeconinck

Copy link
Copy Markdown

Can this get merged?

The desktop build script already accepts `--target deb`; the target string is
passed through to electron-builder untouched and the artifact copy step is
target-agnostic. A deb build fails only because app-builder-lib's FpmTarget
requires two metadata fields the staged package.json omits: `homepage`
(control "Homepage:") and `maintainer` (control "Maintainer:", otherwise
derived from `author`, which carries no email). AppImage needs neither, so
nothing surfaced this.

Rather than add a second Linux matrix entry -- whose upload artifact name
`desktop-linux-x64` would collide with the AppImage entry's -- let the existing
Linux entry emit both targets from one electron-builder run. `--target` now
takes a comma-separated list, and artifactName's ${ext} already keeps the output
files distinct, so there is one artifact name, one runner, and no collision.

The .deb also has to be listed in the collect step and in both
action-gh-release file lists, or it builds and never ships.

Packages declare Electron's shared-library dependencies per format, so a
minimal Debian/Ubuntu install pulls them in instead of the app failing to
start. The same wiring covers `rpm`, exposed as `dist:desktop:rpm` for local
builds; the release workflow stays AppImage+deb because the runners have no
`rpmbuild`.

Consolidates the overlapping .deb work from pingdotgg#4887, pingdotgg#4900 and pingdotgg#5139: the
dependency lists and the rpm target come from @bigpod98's pingdotgg#5139, the docs and
the download-page card from @benthecarman's pingdotgg#4900.

The .deb is not an updater payload -- in-app updates on Linux stay
AppImage-only, so .deb installs upgrade through dpkg/apt. Documented in
docs/operations/release.md.
@chukfinley
chukfinley force-pushed the feat/linux-deb-packaging branch from b70739b to ce3ca8d Compare August 6, 2026 18:10
@macroscopeapp
macroscopeapp Bot dismissed their stale review August 6, 2026 18:10

Dismissing prior approval to re-evaluate ce3ca8d

@chukfinley

Copy link
Copy Markdown
Author

@LouisDeconinck sorry for the slow reply. It had gone stale and conflicting against main, which alone would have blocked a merge. That's fixed now:

There are four overlapping PRs for this (#4071, #4887, #4900, #5139) and a consolidation discussion is running in #5139 — that's the place to push, and I've said there that I'm fine with any of them being the base as long as it's one PR. Whatever lands, the release-workflow wiring in this PR (single Linux run emitting AppImage,deb, plus *.deb in the collect step and in both action-gh-release file lists) is the piece that has to come along, or the package builds and never ships.

Matches the existing dist:desktop:dmg / dist:desktop:win families: the bare
script builds for the host arch, with explicit :arm64 and :x64 variants. Keeps
the Linux packaging scripts in line with what is already there rather than
pinning x64.
The rpm target needs no code beyond what the deb target already added: same
FpmTarget, same homepage/maintainer metadata, and the rpm dependency list is
already in the build config. Only the release wiring was missing.

The Linux job now builds AppImage,deb,rpm from the one electron-builder run,
and *.rpm is added to the collect step and to both action-gh-release file
lists, same as the deb.

electron-builder shells out to rpmbuild for this. The Ubuntu runner image ships
it in the `rpm` package (4.18.2 on 24.04), so the step is a no-op there; it
installs the package only when the binary is missing, which keeps the target
working if the image ever drops it.
@chukfinley chukfinley changed the title feat(release): publish Linux .deb alongside AppImage feat(release): publish Linux .deb and .rpm alongside the AppImage Aug 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:S 10-29 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature Request] Add .deb package for Debian/Ubuntu users

2 participants