From 9dd86dbd09160df68a55cf694cf4fea6b73242b8 Mon Sep 17 00:00:00 2001 From: natan Date: Fri, 3 Jul 2026 23:44:30 +0100 Subject: [PATCH] Release on push events too so .deb/.rpm are published immediately --- .github/workflows/build.yml | 8 +++----- pr_body.txt | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 35 insertions(+), 5 deletions(-) create mode 100644 pr_body.txt diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 1f0ebe3..b1fcce5 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -301,11 +301,9 @@ jobs: path: ${{ steps.artifact.outputs.rpm_path }} release: - # Skip on push so we don't churn the latest release on every commit. - # The gate job already short-circuits the cron when there are no new - # commits since the last release, so reaching this job at all means - # the artifacts are worth publishing. - if: github.event_name != 'push' && needs.gate.outputs.should_run == 'true' + # The gate job short-circuits when there are no new commits, so reaching + # this job at all means the artifacts are worth publishing. + if: needs.gate.outputs.should_run == 'true' needs: [gate, unit-tests, build-windows, build-macos, build-linux] runs-on: ubuntu-latest diff --git a/pr_body.txt b/pr_body.txt new file mode 100644 index 0000000..e6af47c --- /dev/null +++ b/pr_body.txt @@ -0,0 +1,32 @@ +Add native Linux packaging support for FastSM, making installation much simpler on Debian/Ubuntu (.deb) and Fedora/RHEL (.rpm). + +### What's included + +- **New files:** + - `packaging/linux/build_packages.sh` — uses `fpm` to build both package formats from the PyInstaller output + - `packaging/linux/fastsm.desktop` — XDG desktop entry for app menu integration + - `packaging/debian/copyright` — Debian copyright metadata + +- **Modified files:** + - `build.py` — added `--package` flag that calls the packaging script on Linux + - `.github/workflows/build.yml` — installs fpm, runs packaging, uploads .deb/.rpm as artifacts, includes in release + - `README.md` — documents package install instructions + - `.gitignore` — ignores *.deb and *.rpm build artifacts + +### How it works in CI + +After the PyInstaller Linux build completes, `fpm` wraps the output into .deb and .rpm packages that: +- Install the binary bundle to `/opt/FastSM/` +- Register the desktop entry at `/usr/share/applications/fastsm.desktop` +- Copy docs to `/usr/share/doc/fastsm/` +- Declare runtime dependencies (GTK3, libnotify, SDL2, ALSA, PulseAudio, GStreamer) + +### Local usage +``` +python build.py +python build.py --package +bash packaging/linux/build_packages.sh ~/app_dist/FastSM/dist/FastSM 0.5.0 +``` + +### Note +The copyright file currently says "All Rights Reserved" since the project has no LICENSE file. You may want to update `packaging/debian/copyright` and the `APP_LICENSE` variable in `build_packages.sh` once a license is chosen.