From 35176d6effba992292db0e255f8d3179b56dac2a Mon Sep 17 00:00:00 2001 From: lucaronin Date: Sat, 16 May 2026 13:44:11 +0200 Subject: [PATCH] feat: expose rpm download option --- docs/ABSTRACTIONS.md | 2 +- docs/ARCHITECTURE.md | 2 +- site/reference/supported-platforms.md | 2 +- site/start/install.md | 2 +- src-tauri/resources/agent-docs/all.md | 4 +-- .../pages/reference/supported-platforms.md | 2 +- .../agent-docs/pages/start/install.md | 2 +- src-tauri/resources/agent-docs/reference.md | 2 +- src-tauri/resources/agent-docs/start.md | 2 +- src/utils/releaseDownloadPage.test.ts | 34 ++++++++++++++++++- src/utils/releaseDownloadPage.ts | 26 ++++++++++++-- 11 files changed, 66 insertions(+), 14 deletions(-) diff --git a/docs/ABSTRACTIONS.md b/docs/ABSTRACTIONS.md index e87f708c..be3a991a 100644 --- a/docs/ABSTRACTIONS.md +++ b/docs/ABSTRACTIONS.md @@ -910,5 +910,5 @@ Managed by `useSettings` hook and `SettingsPanel` component. `theme_mode` is ins ### CI/CD - **`.github/workflows/release.yml`** — Alpha prereleases from every push to `main` using calendar-semver technical versions (`YYYY.M.D-alpha.N`) and clean `Alpha YYYY.M.D.N` release names. GitHub alpha tags zero-pad the prerelease sequence (`alpha-vYYYY.M.D-alpha.NNNN`) so GitHub release ordering stays chronological while the shipped app version remains `YYYY.M.D-alpha.N`. Publishes `alpha/latest.json` with macOS Apple Silicon/Intel, Linux x64, and Windows x64 updater entries, then refreshes the legacy `latest.json` / `latest-canary.json` aliases to the alpha feed. The Linux job uses Tauri's stock linuxdeploy AppImage output plugin and validates that installer and updater-signature artifacts exist before upload. The docs/release Pages job reads the stable manifest from the latest stable release asset instead of copying the live Pages URL, uploads the built site as a Pages artifact, and deploys it with GitHub's official Pages action so the public updater JSON changes as part of the release workflow. macOS release assets use `Tolaria__macOS_Silicon` and `Tolaria__macOS_Intel` base names. Packaged builds pass the computed version as `VITE_SENTRY_RELEASE`, which is retained as a diagnostic build-version tag but not registered as a normal Sentry release for alpha builds. -- **`.github/workflows/release-stable.yml`** — Stable releases from `stable-vYYYY.M.D` tags. Publishes `stable/latest.json`, macOS Apple Silicon and Intel DMG/updater artifacts, Windows x64 installers/updater bundles, Linux x86_64 `.deb` / `.rpm` / AppImage artifacts, and a static public download page that starts the selected installer without replacing the page with a blank download navigation. The Linux job uses the same stock Tauri/linuxdeploy AppImage packaging and artifact validation as alpha releases. The Pages job reads the alpha manifest from the latest alpha release asset instead of copying the live Pages URL, uploads the built site as a Pages artifact, and deploys it with GitHub's official Pages action so stable and alpha manifests stay fresh. Stable macOS DMG/updater assets use the same `Tolaria__macOS_Silicon` and `Tolaria__macOS_Intel` base names. Packaged builds pass the computed stable version as `VITE_SENTRY_RELEASE`, which is registered as Sentry's release. +- **`.github/workflows/release-stable.yml`** — Stable releases from `stable-vYYYY.M.D` tags. Publishes `stable/latest.json`, macOS Apple Silicon and Intel DMG/updater artifacts, Windows x64 installers/updater bundles, Linux x86_64 `.deb` / `.rpm` / AppImage artifacts, and a static public download page that starts the selected installer without replacing the page with a blank download navigation. Linux visitors default to the AppImage target while the page exposes RPM as a manual Linux package option when the stable release includes one. The Linux job uses the same stock Tauri/linuxdeploy AppImage packaging and artifact validation as alpha releases. The Pages job reads the alpha manifest from the latest alpha release asset instead of copying the live Pages URL, uploads the built site as a Pages artifact, and deploys it with GitHub's official Pages action so stable and alpha manifests stay fresh. Stable macOS DMG/updater assets use the same `Tolaria__macOS_Silicon` and `Tolaria__macOS_Intel` base names. Packaged builds pass the computed stable version as `VITE_SENTRY_RELEASE`, which is registered as Sentry's release. - **Beta cohorts** are handled in PostHog targeting only. There is no beta updater feed. diff --git a/docs/ARCHITECTURE.md b/docs/ARCHITECTURE.md index 200e4622..665b1643 100644 --- a/docs/ARCHITECTURE.md +++ b/docs/ARCHITECTURE.md @@ -971,7 +971,7 @@ push stable-vYYYY.M.D tag → build VitePress public docs into the GitHub Pages root → build static HTML release history page at /releases/ → publish stable/latest.json - → publish stable/download/ and download/ as permanent download pages that keep the browser page visible while the platform installer starts + → publish stable/download/ and download/ as permanent download pages that keep the browser page visible while the platform installer starts, default Linux visitors to AppImage, and expose RPM as a manual Linux option when the stable release includes one → preserve alpha/latest.json → deploy to gh-pages ``` diff --git a/site/reference/supported-platforms.md b/site/reference/supported-platforms.md index 00a4998f..8b2b1c42 100644 --- a/site/reference/supported-platforms.md +++ b/site/reference/supported-platforms.md @@ -6,7 +6,7 @@ Tolaria is a desktop app built with Tauri. Releases currently target macOS, Wind | --- | --- | --- | | macOS | Primary | Main development and QA target. Apple Silicon and Intel artifacts are published. | | Windows | Supported, early | NSIS installers and signed updater bundles are published. Menu, shell-path, and credential-helper behavior receive platform-specific fixes as they appear. | -| Linux | Supported, early | AppImage and deb artifacts are published. Behavior can depend on distro WebKitGTK packages, Wayland/X11 details, and input-method setup. | +| Linux | Supported, early | AppImage, deb, and RPM artifacts are published. Behavior can depend on distro WebKitGTK packages, Wayland/X11 details, and input-method setup. | ## Support Policy diff --git a/site/start/install.md b/site/start/install.md index 01c5af1f..073277fd 100644 --- a/site/start/install.md +++ b/site/start/install.md @@ -24,7 +24,7 @@ brew install --cask tolaria | --- | --- | --- | | macOS | Primary | Apple Silicon and Intel builds are published. Homebrew is available. | | Windows | Supported, early | NSIS installers and signed updater bundles are published. Some shell and menu behavior can still need Windows-specific fixes. | -| Linux | Supported, early | AppImage and deb artifacts are published. Desktop behavior depends on distribution WebKitGTK and input-method integration. | +| Linux | Supported, early | AppImage, deb, and RPM artifacts are published. Desktop behavior depends on distribution WebKitGTK and input-method integration. | See [Supported Platforms](/reference/supported-platforms) for the current support policy. diff --git a/src-tauri/resources/agent-docs/all.md b/src-tauri/resources/agent-docs/all.md index 10de4825..58886a47 100644 --- a/src-tauri/resources/agent-docs/all.md +++ b/src-tauri/resources/agent-docs/all.md @@ -121,7 +121,7 @@ brew install --cask tolaria | --- | --- | --- | | macOS | Primary | Apple Silicon and Intel builds are published. Homebrew is available. | | Windows | Supported, early | NSIS installers and signed updater bundles are published. Some shell and menu behavior can still need Windows-specific fixes. | -| Linux | Supported, early | AppImage and deb artifacts are published. Desktop behavior depends on distribution WebKitGTK and input-method integration. | +| Linux | Supported, early | AppImage, deb, and RPM artifacts are published. Desktop behavior depends on distribution WebKitGTK and input-method integration. | See [Supported Platforms](/reference/supported-platforms) for the current support policy. @@ -1272,7 +1272,7 @@ Tolaria is a desktop app built with Tauri. Releases currently target macOS, Wind | --- | --- | --- | | macOS | Primary | Main development and QA target. Apple Silicon and Intel artifacts are published. | | Windows | Supported, early | NSIS installers and signed updater bundles are published. Menu, shell-path, and credential-helper behavior receive platform-specific fixes as they appear. | -| Linux | Supported, early | AppImage and deb artifacts are published. Behavior can depend on distro WebKitGTK packages, Wayland/X11 details, and input-method setup. | +| Linux | Supported, early | AppImage, deb, and RPM artifacts are published. Behavior can depend on distro WebKitGTK packages, Wayland/X11 details, and input-method setup. | ## Support Policy diff --git a/src-tauri/resources/agent-docs/pages/reference/supported-platforms.md b/src-tauri/resources/agent-docs/pages/reference/supported-platforms.md index c1767f3d..9eaf074c 100644 --- a/src-tauri/resources/agent-docs/pages/reference/supported-platforms.md +++ b/src-tauri/resources/agent-docs/pages/reference/supported-platforms.md @@ -11,7 +11,7 @@ Tolaria is a desktop app built with Tauri. Releases currently target macOS, Wind | --- | --- | --- | | macOS | Primary | Main development and QA target. Apple Silicon and Intel artifacts are published. | | Windows | Supported, early | NSIS installers and signed updater bundles are published. Menu, shell-path, and credential-helper behavior receive platform-specific fixes as they appear. | -| Linux | Supported, early | AppImage and deb artifacts are published. Behavior can depend on distro WebKitGTK packages, Wayland/X11 details, and input-method setup. | +| Linux | Supported, early | AppImage, deb, and RPM artifacts are published. Behavior can depend on distro WebKitGTK packages, Wayland/X11 details, and input-method setup. | ## Support Policy diff --git a/src-tauri/resources/agent-docs/pages/start/install.md b/src-tauri/resources/agent-docs/pages/start/install.md index 54ef8945..4d1ab485 100644 --- a/src-tauri/resources/agent-docs/pages/start/install.md +++ b/src-tauri/resources/agent-docs/pages/start/install.md @@ -29,7 +29,7 @@ brew install --cask tolaria | --- | --- | --- | | macOS | Primary | Apple Silicon and Intel builds are published. Homebrew is available. | | Windows | Supported, early | NSIS installers and signed updater bundles are published. Some shell and menu behavior can still need Windows-specific fixes. | -| Linux | Supported, early | AppImage and deb artifacts are published. Desktop behavior depends on distribution WebKitGTK and input-method integration. | +| Linux | Supported, early | AppImage, deb, and RPM artifacts are published. Desktop behavior depends on distribution WebKitGTK and input-method integration. | See [Supported Platforms](/reference/supported-platforms) for the current support policy. diff --git a/src-tauri/resources/agent-docs/reference.md b/src-tauri/resources/agent-docs/reference.md index f32db5e1..bca6f2fa 100644 --- a/src-tauri/resources/agent-docs/reference.md +++ b/src-tauri/resources/agent-docs/reference.md @@ -247,7 +247,7 @@ Tolaria is a desktop app built with Tauri. Releases currently target macOS, Wind | --- | --- | --- | | macOS | Primary | Main development and QA target. Apple Silicon and Intel artifacts are published. | | Windows | Supported, early | NSIS installers and signed updater bundles are published. Menu, shell-path, and credential-helper behavior receive platform-specific fixes as they appear. | -| Linux | Supported, early | AppImage and deb artifacts are published. Behavior can depend on distro WebKitGTK packages, Wayland/X11 details, and input-method setup. | +| Linux | Supported, early | AppImage, deb, and RPM artifacts are published. Behavior can depend on distro WebKitGTK packages, Wayland/X11 details, and input-method setup. | ## Support Policy diff --git a/src-tauri/resources/agent-docs/start.md b/src-tauri/resources/agent-docs/start.md index 60333f1e..e40ccb5a 100644 --- a/src-tauri/resources/agent-docs/start.md +++ b/src-tauri/resources/agent-docs/start.md @@ -112,7 +112,7 @@ brew install --cask tolaria | --- | --- | --- | | macOS | Primary | Apple Silicon and Intel builds are published. Homebrew is available. | | Windows | Supported, early | NSIS installers and signed updater bundles are published. Some shell and menu behavior can still need Windows-specific fixes. | -| Linux | Supported, early | AppImage and deb artifacts are published. Desktop behavior depends on distribution WebKitGTK and input-method integration. | +| Linux | Supported, early | AppImage, deb, and RPM artifacts are published. Desktop behavior depends on distribution WebKitGTK and input-method integration. | See [Supported Platforms](/reference/supported-platforms) for the current support policy. diff --git a/src/utils/releaseDownloadPage.test.ts b/src/utils/releaseDownloadPage.test.ts index d00a6353..e6d993da 100644 --- a/src/utils/releaseDownloadPage.test.ts +++ b/src/utils/releaseDownloadPage.test.ts @@ -80,7 +80,7 @@ describe('extractStableDownloadTargets', () => { url: 'https://example.com/Tolaria-x64.dmg', }, 'linux-x86_64': { - label: 'Linux', + label: 'Linux AppImage', url: 'https://example.com/Tolaria.AppImage', }, 'windows-x86_64': { @@ -176,6 +176,10 @@ describe('resolveStableDownloadTargets', () => { name: 'Tolaria.AppImage', browser_download_url: 'https://example.com/Tolaria.AppImage', }, + { + name: 'Tolaria.rpm', + browser_download_url: 'https://example.com/Tolaria.rpm', + }, ], }, ] @@ -187,6 +191,10 @@ describe('resolveStableDownloadTargets', () => { 'linux-x86_64': { url: 'https://example.com/Tolaria.AppImage', }, + 'linux-x86_64-rpm': { + label: 'Linux RPM', + url: 'https://example.com/Tolaria.rpm', + }, 'windows-x86_64': { url: 'https://example.com/Tolaria-setup.exe', }, @@ -201,9 +209,33 @@ describe('resolveStableDownloadTargets', () => { 'linux-x86_64': { url: 'https://example.com/Tolaria.AppImage', }, + 'linux-x86_64-rpm': { + label: 'Linux RPM', + url: 'https://example.com/Tolaria.rpm', + }, 'windows-x86_64': { url: 'https://example.com/Tolaria-setup.exe', }, }) }) + + it('keeps AppImage as the Linux auto-download while exposing RPM manually', () => { + const html = buildStableDownloadRedirectPage({ + 'linux-x86_64': { + buttonLabel: 'Download Tolaria AppImage for Linux', + label: 'Linux AppImage', + url: 'https://example.com/Tolaria.AppImage', + }, + 'linux-x86_64-rpm': { + buttonLabel: 'Download Tolaria RPM for Linux', + label: 'Linux RPM', + url: 'https://example.com/Tolaria.rpm', + }, + }) + + expect(html).toContain('linux-x86_64-rpm') + expect(html).toContain('Linux AppImage') + expect(html).toContain('Linux RPM') + expect(html).toContain("if (/Linux/i.test(userAgent) && !/Android/i.test(userAgent)) return 'linux-x86_64';") + }) }) diff --git a/src/utils/releaseDownloadPage.ts b/src/utils/releaseDownloadPage.ts index eca74469..046ae22b 100644 --- a/src/utils/releaseDownloadPage.ts +++ b/src/utils/releaseDownloadPage.ts @@ -5,12 +5,14 @@ type StablePlatformKey = | 'darwin-aarch64' | 'darwin-x86_64' | 'linux-x86_64' + | 'linux-x86_64-rpm' | 'windows-x86_64' type PlatformPayload = { dmg_url?: unknown download_url?: unknown installer_url?: unknown + rpm_url?: unknown url?: unknown } @@ -54,8 +56,12 @@ const PLATFORM_METADATA: Record, +): PlatformPayload | undefined { + const payloadKey = platform === 'linux-x86_64-rpm' ? 'linux-x86_64' : platform + return Reflect.get(platforms, payloadKey) as PlatformPayload | undefined +} + export function extractStableDownloadTargets(payload: unknown): StableDownloadTargets { if (!payload || typeof payload !== 'object') return {} @@ -237,7 +254,7 @@ export function extractStableDownloadTargets(payload: unknown): StableDownloadTa const downloads: StableDownloadTargets = {} for (const platform of PLATFORM_ORDER) { - const platformPayload = Reflect.get(platforms, platform) as PlatformPayload | undefined + const platformPayload = getPlatformPayload(platform, platforms) const url = extractPlatformDownloadUrl(platform, platformPayload) if (url) Reflect.set(downloads, platform, buildStableDownloadTarget(platform, url)) } @@ -282,6 +299,9 @@ function classifyReleaseAsset(name: string): { if (name.endsWith('.AppImage')) { return { platform: 'linux-x86_64', preference: 2 } } + if (name.endsWith('.rpm')) { + return { platform: 'linux-x86_64-rpm', preference: 1 } + } if (name.endsWith('.deb')) { return { platform: 'linux-x86_64', preference: 1 } }