Skip to content

fix(flatpak): add Flatpak distribution support - #279

Closed
Muneerali199 wants to merge 1 commit into
AOSSIE-Org:mainfrom
Muneerali199:fix/flatpak
Closed

Muneerali199 wants to merge 1 commit into
AOSSIE-Org:mainfrom
Muneerali199:fix/flatpak

Conversation

@Muneerali199

@Muneerali199 Muneerali199 commented Mar 9, 2026 •

Copy link
Copy Markdown
Contributor

What & Why

Adds first-class Flatpak packaging so Rein can be distributed on Linux via Flathub / sideloading. Closes #206.

Changes

File Purpose
.github/workflows/flatpak.yml CI pipeline — builds and uploads a rein.flatpak artifact on every relevant push/PR
flatpak/com.rein.app.yml Flatpak manifest (Electron2 BaseApp, Node 20 SDK, Wayland socket + org.freedesktop.portal.Desktop for getDisplayMedia)
flatpak/com.rein.app.desktop Desktop entry for Linux app launchers
flatpak/com.rein.app.metainfo.xml AppStream metadata for software centres
package.json Add linux.target: dir so electron-builder produces an unpacked directory that flatpak-builder can bundle

Testing

  • CI pipeline should pass and upload rein-flatpak artifact
  • Install locally: flatpak install rein.flatpak → launch Rein

Summary by CodeRabbit

  • Chores
    • Added Flatpak packaging support with automated build workflow, enabling distribution and installation through Flatpak repositories on Linux systems.

@coderabbitai

coderabbitai Bot commented Mar 9, 2026 •

Copy link
Copy Markdown
Contributor

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 90f40c3e-7e29-450c-a246-5f0765f7c90e

📥 Commits

Reviewing files that changed from the base of the PR and between a3fbad4 and 4681a51.

📒 Files selected for processing (5)
  • .github/workflows/flatpak.yml
  • flatpak/com.rein.app.desktop
  • flatpak/com.rein.app.metainfo.xml
  • flatpak/com.rein.app.yml
  • package.json

Walkthrough

This pull request adds complete Flatpak distribution pipeline support for the Rein application, including a GitHub Actions workflow for automated Flatpak builds, a Flatpak manifest defining the application runtime and build configuration, desktop entry metadata, AppStream information, and updates to the package.json build targets.

Changes

Cohort / File(s) Summary
Flatpak Configuration
flatpak/com.rein.app.yml
Comprehensive Flatpak manifest defining runtime (org.freedesktop.Platform 24.08), SDK, Electron base image with Node.js 20 extension, finish-args for X11/Wayland/portal support, build environment with offline npm caching hooks, and module configuration for npm install/build/dist workflow with Node.js bundling and wrapper script installation.
CI/CD Automation
.github/workflows/flatpak.yml
GitHub Actions workflow triggered on PR/push (excluding main/master) to automate Flatpak bundle builds. Includes Node.js 20 setup, pinned flatpak-node-generator installation, offline source generation into flatpak/generated-sources.json, Flatpak runtime provisioning, bundle compilation with flatpak-builder, and artifact upload with 7-day retention.
Application Metadata
flatpak/com.rein.app.desktop, flatpak/com.rein.app.metainfo.xml
Desktop entry file defining application launcher metadata (name, comment, icon, executable) and AppStream XML with application summary, description, release notes for version 1.0.0 (2026-03-08), homepage/bug tracker URLs, and content rating.
Build Configuration
package.json
Updated linux build target from "AppImage" to "dir", added linux.category as "Utility", and set linux.executableName to "rein".

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~28 minutes

Suggested labels

Bash Lang

Poem

🐰 A flatpak's born from manifests and care,
With workflows spinning through the GitHub air,
Offline sources cached with perfect grace,
Electron bundled in its cozy space,
Rein now skips toward Flathub's embrace! ✨

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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 and usage tips.

@Muneerali199

Copy link
Copy Markdown
Contributor Author

sir please review it @imxade

@Muneerali199

Copy link
Copy Markdown
Contributor Author

Demo video

hacker@Ishikas_.2026-03-10.13-20-15.mp4

@github-actions

Copy link
Copy Markdown

⚠️ This PR has merge conflicts.

Please resolve the merge conflicts before review.

Your PR will only be reviewed by a maintainer after all conflicts have been resolved.

📺 Watch this video to understand why conflicts occur and how to resolve them:
https://www.youtube.com/watch?v=Sqsz1-o7nXk

- Add .github/workflows/flatpak.yml CI pipeline that builds and uploads
  a .flatpak artifact on every relevant push/PR
- Add flatpak/com.rein.app.yml manifest (Electron BaseApp, Node 20 SDK,
  Wayland socket + XDG Desktop Portal for getDisplayMedia)
- Add flatpak/com.rein.app.desktop desktop entry file
- Add flatpak/com.rein.app.metainfo.xml AppStream metadata
- Add linux build target to package.json for electron-builder
@imxade

imxade commented Mar 12, 2026

Copy link
Copy Markdown
Member

we should diretly publish to flathub separate instead, and that wont require changes in main repo

i've updated the issue as well

@imxade imxade closed this Mar 12, 2026
@Muneerali199

Copy link
Copy Markdown
Contributor Author

Got it! @imxade Will create a separate repo and submit to Flathub directly. Will update #206 once the PR is open.

@imxade

imxade commented Mar 12, 2026

Copy link
Copy Markdown
Member

Got it! @imxade Will create a separate repo and submit to Flathub directly. Will update #206 once the PR is open.

do it later once the entire functionality gets working on electron

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[WorkFlow] Flathub distribution pipeline

2 participants