feat(packaging): build .deb and .rpm packages#2466
Merged
Conversation
Add MakerDeb and MakerRpm to the Electron Forge config so Linux releases also produce .deb and .rpm packages alongside the AppImage and zip. Both declare mimeType x-scheme-handler/posthog-code, so installing registers the posthog-code:// deep-link handler system-wide via the generated .desktop file and the package manager's update-desktop-database trigger. The package name/bin yield /usr/bin/posthog-code, consistent with the AUR package. The publish-linux CI job (x64 + arm64) now installs fakeroot (maker-deb) and rpm (maker-rpm), so both arches are built and uploaded automatically. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Adds native Linux packaging to the Electron Forge release pipeline by introducing .deb and .rpm makers, wiring required build tooling into CI and the local Docker build script, and updating dependencies/lockfile accordingly.
Changes:
- Add Electron Forge
MakerDebandMakerRpmconfiguration (including URL scheme MIME registration). - Update Linux build environments (CI + local Docker script) to install
fakerootandrpm, and allow selecting specific maker targets. - Add new maker dependencies to
package.jsonandpnpm-lock.yaml.
Reviewed changes
Copilot reviewed 4 out of 5 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| pnpm-lock.yaml | Adds lock entries for new Electron Forge maker dependencies. |
| apps/code/scripts/build-linux-docker.sh | Installs deb/rpm tooling in container and adds target selection flag parsing. |
| apps/code/package.json | Adds @electron-forge/maker-deb and @electron-forge/maker-rpm devDependencies. |
| apps/code/forge.config.ts | Registers deb/rpm makers and configures package metadata + scheme handler MIME type. |
| .github/workflows/code-release.yml | Installs fakeroot and rpm in the Linux publish workflow. |
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Contributor
Prompt To Fix All With AIFix the following 1 code review issue. Work through them one at a time, proposing concise fixes.
---
### Issue 1 of 1
apps/code/forge.config.ts:211-239
Nine of the eleven options in `MakerDeb` and `MakerRpm` are identical. Extracting the shared fields into a single constant satisfies the OnceAndOnlyOnce rule and makes a future field change (e.g. updating the description or homepage) a one-line edit rather than two.
```suggestion
new MakerDeb({
options: {
...sharedLinuxOptions,
section: "devel",
maintainer: "PostHog <eng@posthog.com>",
},
}),
new MakerRpm({
options: {
...sharedLinuxOptions,
license: "MIT",
},
}),
```
Reviews (1): Last reviewed commit: "feat(packaging): build .deb and .rpm pac..." | Re-trigger Greptile |
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
charlesvien
approved these changes
Jun 4, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds
.deband.rpmLinux packages to the release, alongside the existing AppImage and zip.forge.config.ts: addMakerDebandMakerRpm. Both declaremimeType: ["x-scheme-handler/posthog-code"], so installing registers theposthog-code://deep-link handler system-wide via the generated.desktopfile + the package manager'supdate-desktop-databasetrigger (the same mechanism VS Code's deb/rpm use). Packagename/binyield/usr/bin/posthog-code, consistent with the AUR package.package.json/ lockfile: add@electron-forge/maker-deband@electron-forge/maker-rpm.code-release.yml: thepublish-linuxjob (x64 + arm64) now installsfakeroot(maker-deb) andrpm(maker-rpm), so both arches build and upload automatically.scripts/build-linux-docker.sh: installfakeroot+rpmso localpnpm --filter code make:linuxdoesn't break on the new makers, and add optional--target/--targets(aliases:deb,rpm,zip,appimage, or a full maker package name) to build a subset.Why
Native Arch/Debian/Fedora-style installs that also register the URL scheme handler at install time, so the browser can launch the app after login without runtime registration.
Testing / validation
forge.config.tstypechecks against the real maker types (no errors from the new blocks).libgconf/GConf2dep is excluded for our Electron — packages should be installable with default deps on modern Ubuntu/Debian/Fedora.build-linux-docker.shtarget parser validated under bash across flag/=/comma/env forms (case-insensitive, rejects unknowns).apt-get install ./*.deb/dnf install ./*.rpmandxdg-mime query default x-scheme-handler/posthog-code.Notes
georges/linux-publish-aur).🤖 Generated with Claude Code