feat: add automatic update functionality for Electron app

Closes #613

- Add electron-updater for Windows NSIS and Linux AppImage auto-update
- macOS and Linux DEB fall back to GitHub API check with download link
- Add "Check for Updates" menu item with i18n (en, zh, ja, zh-Hant)
- Fix Windows CI workflow to publish correct latest.yml after code signing
- Add update toast notifications in renderer via sonner
This commit is contained in:
dayuan.jiang
2026-04-03 17:46:27 +09:00
parent f593901fee
commit e27afe6f0d
13 changed files with 739 additions and 38 deletions

View File

@@ -6,6 +6,7 @@ import {
type MenuItemConstructorOptions,
shell,
} from "electron"
import { checkForUpdatesManual } from "./auto-updater"
import {
applyPresetToEnv,
getAllPresets,
@@ -156,6 +157,11 @@ function getMenuTemplate(): MenuItemConstructorOptions[] {
template.push({
label: t.help,
submenu: [
{
label: t.checkForUpdates,
click: () => checkForUpdatesManual(),
},
{ type: "separator" },
{
label: t.documentation,
click: async () => {