feat(release): publish Linux .deb alongside AppImage#4071
Conversation
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.
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
ApprovabilityVerdict: 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. |
Closes #298.
One open question
Maintainer:is a mandatory Debian control field, so the deb target needs an address. I usedhello@t3.toolsas 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 debalready works.createBuildConfigpasses 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'sFpmTargetrequires two metadata fields the stagedpackage.jsonomits. AppImage needs neither, so nothing ever surfaced it:Add
homepage, addmaintainer. 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 alinux/deb/x64entry producesdesktop-linux-x64— the same name the AppImage entry already uses.upload-artifactthen 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.AppImagefrom.deb.Side effect: no extra runner and no second full desktop build, so release wall-clock is unchanged.
Changes
scripts/build-desktop-artifact.tshomepage+maintainer; splittargeton commas so one Linux run can emit several targets..github/workflows/release.ymlAppImage,deb; add*.debto the collect step and to both release upload lists.package.jsondist:desktop:debfor local builds, matching the existingdist:desktop:*family.Note the two
softprops/action-gh-releaseblocks (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:
dpkg -cshows the executable at/opt/T3 Code*/t3codeand the.desktopentry at/usr/share/applications/t3code.desktop. Installs and launches viasudo apt install ./T3-Code-*-amd64.deb.Deliberately not included
.debcard 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.FpmTargetcovers 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
.debpackage 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,debin one run, collects*.debwith other desktop assets, and attaches them in both GitHub release upload paths.build-desktop-artifact.tsadds deb-requiredhomepageandmaintaineron the stagedpackage.json, setsmaintainerin the Linux electron-builder config, and splits comma-separatedtargetvalues so multiple Linux formats emit distinct files via${ext}. Rootpackage.jsonaddsdist:desktop:debfor 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
AppImageanddebtargets by passing a comma-separated list to the Linux job matrix, and includes*.debfiles in release asset uploads.maintainerfield for deb packaging, and populateshomepagein the stagedpackage.json(required by the deb target).dist:desktop:debnpm script in package.json for local deb builds targeting Linux x64.Macroscope summarized b70739b.