feat(desktop): wire up HealthChat auto-update + public installer hosting

The Electron auto-updater (Squirrel.Mac / Squirrel.Windows) was already
implemented but switched off for HealthChat because the variant config
omitted update_base_url, and CI published only installers (no update feed),
to a private GitHub Release that can't serve end users or the updater.

- config.json: set update_base_url to https://healthchat.ch/packages/desktop/update/
  so electron-main starts the updater.
- build-healthchat-desktop.yaml: pass base-url to the macOS job so releases.json
  is generated; extend the release job to stage the update feed + public
  installers and mirror them to healthchat.ch over FTPS (lftp, no-delete to
  preserve prior nupkgs; password via LFTP_PASSWORD).
- Document the feed/install layout, FTP secrets, and the two caveats (first
  install is manual; Windows auto-update needs the Setup.exe path, not .msi)
  in the healthchat README and the releasing-healthchat skill.

Requires repo secrets FTP_SERVER / FTP_USERNAME / FTP_PASSWORD.
This commit is contained in:
2026-06-28 09:54:08 +02:00
parent bd6241ad9d
commit ade1dff201
4 changed files with 112 additions and 3 deletions
+32 -2
View File
@@ -90,6 +90,38 @@ Without these the jobs still build but produce unsigned/untrusted output. Becaus
a public-history fork, add environment/branch protection so only release/healthchat + healthchat-v*
runs can reach the signing credentials.
Auto-update + public installer hosting
--------------------------------------
The apps self-update over a feed hosted on healthchat.ch (the GitHub Release is private to this
internal fork, so it can serve neither end users nor the Squirrel auto-updater). Both the update
feed and the public installers live under https://healthchat.ch/packages/desktop/ (FTP web root
/public_html/healthchat.ch maps to https://healthchat.ch/; no packages. subdomain, so it's a path):
update/ the Squirrel feed the installed apps poll hourly. config.json sets
"update_base_url": "https://healthchat.ch/packages/desktop/update/"
and the macos job passes base-url: https://healthchat.ch/packages/desktop so the
generated releases.json points the *-mac.zip at this origin.
update/macos/releases.json + HealthChat-<ver>-mac.zip (Squirrel.Mac)
update/win32/<arch>/RELEASES + HealthChat-<ver>-full.nupkg (Squirrel.Windows; x64 + arm64)
install/ public downloads for the FIRST install (users get these URLs, not the GitHub Release):
install/macos/HealthChat-<ver>.dmg + HealthChat.dmg (stable "latest")
install/win32/<arch>/HealthChat-Setup-<ver>.exe + HealthChat-Setup.exe (stable) + *.msi
The `release` job in build-healthchat-desktop.yaml stages these trees and uploads them via lftp/FTPS
(mirror -R, no-delete so prior nupkgs survive for delta history). Add these repo secrets:
FTP_SERVER hostname only (explicit FTPS / AUTH TLS on port 21; if the host cert is untrusted,
flip ssl:verify-certificate to no in the workflow)
FTP_USERNAME
FTP_PASSWORD
Caveats:
- First install is manual. Apps already installed without update_base_url (<= 1.1.2) cannot
self-update to the first build that carries it; users must download once from the install/ URL.
Every release after that updates automatically.
- Windows auto-update only works for the Squirrel Setup.exe install path, NOT the per-machine
.msi (the updater needs Squirrel's Update.exe, which the MSI doesn't install). Hand users the
Setup.exe as the primary Windows installer. macOS: install the .dmg into /Applications.
Open items
----------
- api_base_url: confirm the production API origin in config.json (currently assumed
@@ -99,5 +131,3 @@ Open items
rewrites any `version` override into a nightly string), NOT the healthchat-v tag. Bump
apps/desktop/package.json in the release commit if you want the About dialog / installer
filenames to match the tag.
- Auto-update: not wired up. The apps install from the GitHub Release but do not self-update.
Adding it needs a hosted update feed (releases.json / RELEASES) on a stable URL.
@@ -96,6 +96,7 @@
]
},
"show_labs_settings": false,
"update_base_url": "https://healthchat.ch/packages/desktop/update/",
"modules": ["/modules/healthchat-module.js"],
"ch.healthchat": {
"api_base_url": "https://healthchat.ch",