Skip to content

feat(release): publish Linux .deb alongside AppImage#4071

Open
chukfinley wants to merge 1 commit into
pingdotgg:mainfrom
chukfinley:feat/linux-deb-packaging
Open

feat(release): publish Linux .deb alongside AppImage#4071
chukfinley wants to merge 1 commit 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.

Changes

File Change
scripts/build-desktop-artifact.ts Add homepage + maintainer; split target on commas so one Linux run can emit several targets.
.github/workflows/release.yml Linux matrix builds AppImage,deb; add *.deb to the collect step and to both release upload lists.
package.json dist:desktop:deb for local builds, matching the existing dist:desktop:* family.

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.

Deliberately not included

  • No .deb card on the marketing download page — happy to add it here or in a follow-up, but it seemed better to keep the release-pipeline change reviewable on its own.
  • No rpm. The same FpmTarget covers it, so it is a one-word matrix change later if you want it.

Note

Low Risk
Changes are limited to release packaging metadata and CI asset globs; no runtime app logic or auth paths are touched.

Overview
Linux releases now ship a .deb package in addition to the existing AppImage, without adding a second CI matrix job or duplicate Linux builds.

The release workflow’s Linux x64 step builds AppImage,deb in one run, collects *.deb with other desktop assets, and attaches them in both GitHub release upload paths. build-desktop-artifact.ts adds deb-required homepage and maintainer on the staged package.json, sets maintainer in the Linux electron-builder config, and splits comma-separated target values so multiple Linux formats emit distinct files via ${ext}. Root package.json adds dist:desktop:deb for local deb-only builds.

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

Note

Publish Linux .deb artifact alongside AppImage in release workflow

  • Updates release.yml to build both AppImage and deb targets by passing a comma-separated list to the Linux job matrix, and includes *.deb files in release asset uploads.
  • Updates build-desktop-artifact.ts to split the target string on commas, adds a maintainer field for deb packaging, and populates homepage in the staged package.json (required by the deb target).
  • Adds a dist:desktop:deb npm script in package.json for local deb builds targeting Linux x64.

Macroscope summarized b70739b.

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.
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.
@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

Run ID: f07bab8e-504e-49f0-b68a-931fcaf0eed9

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

macroscopeapp Bot commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Approved

This PR adds .deb package support to the Linux release process through minor CI/CD workflow and build configuration changes. No runtime application behavior is affected - the changes only add a new distribution format alongside the existing AppImage.

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

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

1 participant