feat(release): publish Linux .deb and .rpm alongside the AppImage - #4071
feat(release): publish Linux .deb and .rpm alongside the AppImage#4071chukfinley wants to merge 3 commits into
Conversation
|
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 Plus 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: 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. |
|
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.
b70739b to
ce3ca8d
Compare
Dismissing prior approval to re-evaluate ce3ca8d
|
@LouisDeconinck sorry for the slow reply. It had gone stale and conflicting against
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 |
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.
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.
rpm
.rpmships from the same job. It needs no code beyond what the deb target already required — sameFpmTarget, samehomepage/maintainer, and the rpm dependency list sits next to the deb one — so the Linux job buildsAppImage,deb,rpmin one electron-builder run and*.rpmjoins*.debin the collect step and both upload lists.electron-builder shells out to
rpmbuildfor this. The Ubuntu 24.04 runner image ships it in therpmpackage (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
scripts/build-desktop-artifact.tshomepage+maintainer; splittargeton commas so one Linux run can emit several targets; declare Electron's shared-librarydependsper package format (deb and rpm).scripts/build-desktop-artifact.test.tsdeb/rpmsections only appear for the formats actually built..github/workflows/release.ymlAppImage,deb,rpm; add*.deband*.rpmto the collect step and to both release upload lists; ensurerpmbuildis present.package.jsondist:desktop:debanddist:desktop:rpm, each with:arm64/:x64variants, matching the existingdist:desktop:dmg/:winfamilies (bare script uses host arch).docs/internals/scripts.md,docs/operations/release.md.debis not an updater payload.apps/marketing/src/pages/download.astro.debcard on the download page (amd64.debasset suffix).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.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:
dependslists for deb and rpm, and therpmtarget, from @bigpod98's feat(packaging): add deb and rpm desktop targets #5139Credit 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:
/usr/bin/t3launcher. 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.dist:desktop:deb:arm64,dist:desktop:rpm:arm64build 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
main, no conflictsvitest run scripts/build-desktop-artifact.test.ts— 32 passedvp linton the touched scripts — clean;astro checkonapps/marketing— 0 errorsNote
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.rpmfrom the existing single Linux matrix job by passing a comma-separatedAppImage,deb,rpmtarget—avoiding a second runner and duplicate artifact names.The desktop packager gains
resolveLinuxTargets, stagedhomepage/ maintainer metadata required by electron-builder’s deb/rpm targets, and per-formatdependslists; CI installsrpmbuildwhen needed and attaches*.deb/*.rpmto GitHub Releases. Localdist:desktop:deb/rpmscripts, docs, tests, and a marketing.debdownload 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
AppImage,deb,rpmin a single Linux x64 run, installsrpmbuildon the runner when needed, and uploads.deb/.rpmfiles as release assets alongside the AppImage.scripts/build-desktop-artifact.tsgainsresolveLinuxTargetsto parse comma-separated target strings, and conditionally injectsdeb.depends/rpm.depends, maintainer, homepage, and other metadata into the Tauri build config.dist:desktop:debanddist:desktop:rpmnpm scripts (includingarm64/x64variants) allow local builds of each format..debdownload card for Debian/Ubuntu (x86_64)..deband.rpmare shipped in the release but are not updater payloads.Macroscope summarized 6815958.