feat(pkg): add flatpak build manifest and workflow (#75)

* feat(pkg): add flatpak build manifest

* feat(pkg): add flatpak build step to release workflow

* fix(pkg): flatpak build script failing due to absence of zsh

* fix: flatpak manifest pcsc build error

* feat(pkg): build flatpaks parallel to other workflow steps

* fix(pkg): windows installation binaries glob in workflow

* chore(pkg): change appimage naming in release workflow
This commit is contained in:
Suyog Tandel
2026-02-27 21:03:38 +05:30
committed by GitHub
parent 08ac803121
commit a766cae501
7 changed files with 212 additions and 16 deletions
@@ -0,0 +1,68 @@
{
"id": "in.suyogtandel.picoforge",
"runtime": "org.freedesktop.Platform",
"runtime-version": "25.08",
"sdk": "org.freedesktop.Sdk",
"sdk-extensions": [
"org.freedesktop.Sdk.Extension.rust-stable"
],
"command": "picoforge",
"finish-args": [
"--socket=wayland",
"--socket=fallback-x11",
"--device=dri",
"--share=ipc",
"--device=all",
"--socket=pcsc"
],
"build-options": {
"append-path": "/usr/lib/sdk/rust-stable/bin",
"prepend-path": "/run/build/picoforge/cargo/bin",
"append-ld-library-path": "/usr/lib/sdk/rust-stable/lib",
"env": {
"CARGO_HOME": "/run/build/picoforge/cargo",
"RUST_BACKTRACE": "1"
},
"build-args": [
"--share=network"
]
},
"modules": [
{
"name": "pcsc-lite",
"buildsystem": "meson",
"config-opts": [
"--libdir=lib",
"-Dlibsystemd=false",
"-Dlibudev=false",
"-Dpolkit=false",
"-Dusb=false",
"-Dserial=false"
],
"sources": [
{
"type": "archive",
"url": "https://github.com/LudovicRousseau/PCSC/archive/refs/tags/2.4.1.tar.gz",
"sha256": "e7b6737f68c3b9a763fb0b0370d899cea091cced9d762ca8a6032c959576d5be"
}
]
},
{
"name": "picoforge",
"buildsystem": "simple",
"build-commands": [
"cargo build --release --manifest-path Cargo.toml",
"install -Dm755 target/release/picoforge /app/bin/picoforge",
"install -Dm644 static/appIcons/in.suyogtandel.picoforge.svg /app/share/icons/hicolor/scalable/apps/in.suyogtandel.picoforge.svg",
"install -Dm644 data/in.suyogtandel.picoforge.desktop /app/share/applications/in.suyogtandel.picoforge.desktop",
"install -Dm644 data/in.suyogtandel.picoforge.metainfo.xml /app/share/metainfo/in.suyogtandel.picoforge.metainfo.xml"
],
"sources": [
{
"type": "dir",
"path": "../.."
}
]
}
]
}
+5 -1
View File
@@ -1,11 +1,15 @@
#!/bin/bash
set -e
VERSION=${version:-"0.0.0"}
ARCH=$(uname -m)
if [ "$ARCH" == "x86_64" ]; then
LINUXDEPLOY_ARCH="x86_64"
APPIMAGE_ARCH="x86-64"
elif [ "$ARCH" == "aarch64" ]; then
LINUXDEPLOY_ARCH="aarch64"
APPIMAGE_ARCH="arm64"
else
echo "Unsupported architecture: $ARCH"
exit 1
@@ -50,7 +54,7 @@ echo "Running linuxdeploy..."
rm "linuxdeploy-${LINUXDEPLOY_ARCH}.AppImage"
mkdir -p target/release
mv *.AppImage target/release/
mv *.AppImage "target/release/picoforge_${VERSION}_${APPIMAGE_ARCH}.AppImage"
echo "AppImage build complete. Artifacts moved to target/release/"
ls -l target/release/*.AppImage
+26
View File
@@ -0,0 +1,26 @@
#!/bin/bash
set -e
PLATFORM=$1
VERSION=${version:-"0.0.0"}
if [[ "$PLATFORM" == "ubuntu-24.04-arm" ]]; then
ARCH="arm64"
FLATPAK_ARCH="aarch64"
else
ARCH="x86-64"
FLATPAK_ARCH="x86_64"
fi
echo "Building Flatpak for architecture: $FLATPAK_ARCH (Release: $VERSION)"
flatpak remote-add --user --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
flatpak install --user -y flathub \
org.freedesktop.Platform//25.08 \
org.freedesktop.Sdk//25.08 \
org.freedesktop.Sdk.Extension.rust-stable//25.08
flatpak-builder --user --arch="${FLATPAK_ARCH}" --force-clean --repo=repo build-dir .github/manifests/in.suyogtandel.picoforge.json
flatpak build-bundle repo "picoforge_${VERSION}_${ARCH}.flatpak" in.suyogtandel.picoforge
+40 -14
View File
@@ -15,20 +15,33 @@ jobs:
fail-fast: false
matrix:
include:
- platform: "macos-latest" # for Arm based macs (M1 and above)
- platform: "macos-latest"
args: "--target aarch64-apple-darwin"
- platform: "macos-latest" # for Intel based macs
build_type: "standard"
- platform: "macos-latest"
args: "--target x86_64-apple-darwin"
build_type: "standard"
- platform: "ubuntu-22.04"
args: ""
build_type: "standard"
- platform: "ubuntu-latest"
args: ""
build_type: "flatpak"
- platform: "ubuntu-24.04-arm"
args: ""
- platform: "windows-latest" # Windows x64
build_type: "standard"
- platform: "ubuntu-24.04-arm"
args: ""
build_type: "flatpak"
- platform: "windows-latest"
args: "--target x86_64-pc-windows-msvc"
- platform: "windows-latest" # Windows x86 (32-bit)
build_type: "standard"
- platform: "windows-latest"
args: "--target i686-pc-windows-msvc"
- platform: "windows-latest" # Windows ARM64
build_type: "standard"
- platform: "windows-latest"
args: "--target aarch64-pc-windows-msvc"
build_type: "standard"
runs-on: ${{ matrix.platform }}
steps:
@@ -37,6 +50,7 @@ jobs:
fetch-depth: 0
- name: install Rust stable
if: matrix.build_type == 'standard'
uses: dtolnay/rust-toolchain@stable
with:
targets: >
@@ -44,6 +58,7 @@ jobs:
matrix.platform == 'windows-latest' && 'x86_64-pc-windows-msvc,i686-pc-windows-msvc,aarch64-pc-windows-msvc' || '' }}
- name: Cache Cargo registry and target
if: matrix.build_type == 'standard'
uses: Swatinem/rust-cache@v2
with:
key: ${{ matrix.platform }}-${{ matrix.args }}
@@ -89,26 +104,36 @@ jobs:
echo "version=$version" >> $GITHUB_ENV
- name: install cargo-packager
if: matrix.build_type == 'standard'
uses: taiki-e/install-action@v2
with:
tool: cargo-packager
- name: Build Binary
if: matrix.build_type == 'standard'
run: cargo build --release ${{ matrix.args }}
- name: Build and Package
if: matrix.platform != 'ubuntu-22.04' && matrix.platform != 'ubuntu-24.04-arm' && matrix.build_type == 'standard'
run: cargo packager --release ${{ matrix.args }}
- name: Build and Package (Linux)
if: matrix.platform == 'ubuntu-22.04' || matrix.platform == 'ubuntu-24.04-arm'
if: (matrix.platform == 'ubuntu-22.04' || matrix.platform == 'ubuntu-24.04-arm') && matrix.build_type == 'standard'
run: cargo packager --release --formats deb,pacman
- name: Build AppImage
if: matrix.platform == 'ubuntu-22.04' || matrix.platform == 'ubuntu-24.04-arm'
if: (matrix.platform == 'ubuntu-22.04' || matrix.platform == 'ubuntu-24.04-arm') && matrix.build_type == 'standard'
run: |
chmod +x .github/scripts/build_appimage.sh
./.github/scripts/build_appimage.sh
- name: Build and Package
if: matrix.platform != 'ubuntu-22.04' && matrix.platform != 'ubuntu-24.04-arm'
run: cargo packager --release ${{ matrix.args }}
- name: Build Flatpak
if: matrix.build_type == 'flatpak'
run: |
sudo apt-get update
sudo apt-get install -y flatpak flatpak-builder appstream
chmod +x .github/scripts/build_flatpak.sh
./.github/scripts/build_flatpak.sh ${{ matrix.platform }}
- name: Upload Release Assets
uses: softprops/action-gh-release@v2
@@ -122,6 +147,7 @@ jobs:
#### Check the Installation guide for the Application on the wiki: https://github.com/librekeys/picoforge/wiki/Installation
prerelease: false
files: |
*.flatpak
target/release/*.deb
target/release/*.appimage
target/release/*.AppImage
@@ -134,16 +160,16 @@ jobs:
target/x86_64-apple-darwin/release/*.app
target/aarch64-apple-darwin/release/*.app
target/x86_64-pc-windows-msvc/release/*.msi
target/x86_64-pc-windows-msvc/release/*.exe
target/x86_64-pc-windows-msvc/release/*-setup.exe
target/i686-pc-windows-msvc/release/*.msi
target/i686-pc-windows-msvc/release/*.exe
target/i686-pc-windows-msvc/release/*-setup.exe
target/aarch64-pc-windows-msvc/release/*.msi
target/aarch64-pc-windows-msvc/release/*.exe
target/aarch64-pc-windows-msvc/release/*-setup.exe
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Sync Spec Version & Tag
if: matrix.platform == 'ubuntu-22.04'
if: matrix.platform == 'ubuntu-22.04' && matrix.build_type == 'standard'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
+6
View File
@@ -17,6 +17,12 @@ vite.config.ts.timestamp-*
result
.direnv
# Flatpak
.flatpak
.flatpak-builder
repo
picoforge.flatpak
# misc
docs-gpui-components
src-svelte
+1 -1
View File
@@ -7,4 +7,4 @@ Terminal=false
Categories=Utility;Clock;
Keywords=Config;
StartupNotify=true
DBusActivatable=true
DBusActivatable=false
@@ -0,0 +1,66 @@
<?xml version="1.0" encoding="UTF-8"?>
<component type="desktop-application">
<id>in.suyogtandel.picoforge</id>
<metadata_license>CC0-1.0</metadata_license>
<project_license>AGPL-3.0-only</project_license>
<name>PicoForge</name>
<summary>pico fido key commissioning tool</summary>
<description>
<p>PicoForge is a modern desktop application for configuring and managing Pico FIDO security keys. Built with Rust and GPUI, it provides an intuitive interface for reading device information, configuring USB identifiers, adjusting LED settings, managing security features, and monitoring real-time system logs.</p>
</description>
<developer id="in.suyogtandel">
<name>Suyog Tandel</name>
</developer>
<url type="homepage">https://github.com/librekeys/picoforge</url>
<url type="vcs-browser">https://github.com/librekeys/picoforge</url>
<url type="bugtracker">https://github.com/librekeys/picoforge/issues</url>
<url type="help">https://github.com/librekeys/picoforge/wiki</url>
<url type="donation">https://ko-fi.com/lockedmutex</url>
<url type="contact">https://matrix.to/#/%23librekeys:matrix.org</url>
<url type="contribute">https://github.com/librekeys/picoforge/blob/main/.github/CONTRIBUTING.md</url>
<launchable type="desktop-id">in.suyogtandel.picoforge.desktop</launchable>
<content_rating type="oars-1.1" />
<supports>
<control>keyboard</control>
<control>pointing</control>
</supports>
<requires>
<display_length compare="ge">360</display_length>
</requires>
<branding>
<color type="primary" scheme_preference="light">#fafafa</color>
<color type="primary" scheme_preference="dark">#18181b</color>
</branding>
<screenshots>
<screenshot type="default">
<image>https://raw.githubusercontent.com/librekeys/picoforge/main/data/screenshots/screenshot-1.webp</image>
<caption>Main Interface</caption>
</screenshot>
<screenshot>
<image>https://raw.githubusercontent.com/librekeys/picoforge/main/data/screenshots/screenshot-2.webp</image>
<caption>PassKeys Management</caption>
</screenshot>
<screenshot>
<image>https://raw.githubusercontent.com/librekeys/picoforge/main/data/screenshots/screenshot-3.webp</image>
<caption>Configuration Interface</caption>
</screenshot>
</screenshots>
<releases>
<release version="0.4.1" date="2026-02-22">
<url type="details">https://github.com/librekeys/picoforge/releases/tag/v0.4.1</url>
<description translate="no">
<p>Release 0.4.1</p>
</description>
</release>
</releases>
</component>