Skip to content

Commit 6815958

Browse files
committed
feat(release): ship the Linux .rpm alongside the .deb
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.
1 parent 195040d commit 6815958

3 files changed

Lines changed: 22 additions & 5 deletions

File tree

‎.github/workflows/release.yml‎

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -355,7 +355,7 @@ jobs:
355355
- label: Linux x64
356356
runner: blacksmith-32vcpu-ubuntu-2404
357357
platform: linux
358-
target: AppImage,deb
358+
target: AppImage,deb,rpm
359359
arch: x64
360360
rust_target: x86_64-unknown-linux-gnu
361361
resource_key: linux-x64
@@ -515,6 +515,20 @@ jobs:
515515
Select-Object -Unique
516516
"PSModulePath=$($modulePathEntries -join ';')" >> $env:GITHUB_ENV
517517
518+
# electron-builder's rpm target shells out to rpmbuild. The Ubuntu image
519+
# ships it via the `rpm` package, but installing it here keeps the target
520+
# working if the runner image ever drops it, and costs nothing when the
521+
# binary is already present.
522+
- name: Ensure rpmbuild is available
523+
if: matrix.platform == 'linux' && contains(matrix.target, 'rpm')
524+
shell: bash
525+
run: |
526+
if ! command -v rpmbuild >/dev/null 2>&1; then
527+
sudo apt-get update
528+
sudo apt-get install -y rpm
529+
fi
530+
rpmbuild --version
531+
518532
- name: Build desktop artifact
519533
shell: bash
520534
env:
@@ -609,6 +623,7 @@ jobs:
609623
"release/*.zip" \
610624
"release/*.AppImage" \
611625
"release/*.deb" \
626+
"release/*.rpm" \
612627
"release/*.exe" \
613628
"release/*.blockmap" \
614629
"release/*.yml"; do
@@ -832,6 +847,7 @@ jobs:
832847
release-assets/*.zip
833848
release-assets/*.AppImage
834849
release-assets/*.deb
850+
release-assets/*.rpm
835851
release-assets/*.exe
836852
release-assets/*.blockmap
837853
release-assets/*.yml
@@ -853,6 +869,7 @@ jobs:
853869
release-assets/*.zip
854870
release-assets/*.AppImage
855871
release-assets/*.deb
872+
release-assets/*.rpm
856873
release-assets/*.exe
857874
release-assets/*.blockmap
858875
release-assets/*.yml

‎docs/internals/scripts.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ authenticated.
7171
- `vp run dist:desktop:deb`: Builds a Debian/Ubuntu `.deb` into `./release`. Architecture defaults to
7272
the host; `:arm64` and `:x64` variants exist.
7373
- `vp run dist:desktop:rpm`: Builds a Fedora/RHEL `.rpm` into `./release`. `:arm64` and `:x64`
74-
variants exist. Needs `rpmbuild` on the host; the release workflow therefore ships the `.deb` only.
74+
variants exist. Needs `rpmbuild` on the host (`apt install rpm` on Debian/Ubuntu).
7575
- `vp run dist:desktop:win`: Builds a Windows NSIS installer into `./release`. `:arm64` and `:x64`
7676
variants exist.
7777

‎docs/operations/release.md‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ This document covers the unified release workflow for stable and nightly desktop
1616
- Builds four artifacts in parallel for both channels:
1717
- macOS `arm64` DMG
1818
- macOS `x64` DMG
19-
- Linux `x64` AppImage plus a `.deb` emitted by the same electron-builder run
19+
- Linux `x64` AppImage plus `.deb` and `.rpm` emitted by the same electron-builder run
2020
- Windows `x64` NSIS installer
2121
- Publishes one GitHub Release with all produced files.
2222
- Stable tags with a suffix after `X.Y.Z` (for example `1.2.3-alpha.1`) are published as GitHub prereleases.
@@ -208,8 +208,8 @@ desktop-managed guidance when those environments are available.
208208
- otherwise `GITHUB_REPOSITORY` from GitHub Actions.
209209
- Required release assets for updater:
210210
- platform installers (`.exe`, `.dmg`, `.AppImage`, plus macOS `.zip` for Squirrel.Mac update payloads)
211-
- the Linux `.deb` ships in the same release but is not an updater payload: in-app updates on Linux
212-
stay AppImage-only, so `.deb` installs upgrade through `dpkg`/`apt`
211+
- the Linux `.deb` and `.rpm` ship in the same release but are not updater payloads: in-app updates
212+
on Linux stay AppImage-only, so those installs upgrade through `dpkg`/`apt` and `rpm`/`dnf`
213213
- channel metadata: `latest*.yml` for stable releases, `nightly*.yml` for nightly releases
214214
- `*.blockmap` files (used for differential downloads)
215215
- macOS metadata note:

0 commit comments

Comments
 (0)