feat: add autoUpdater

This commit is contained in:
kangfenmao 2024-07-12 16:24:27 +08:00
parent 5f0f223b5b
commit 72e5a35c26
2 changed files with 6 additions and 2 deletions

View File

@ -39,8 +39,9 @@ appImage:
artifactName: ${name}-${version}.${ext}
npmRebuild: false
publish:
provider: generic
url: https://example.com/auto-updates
provider: github
repo: cherry-studio
owner: kangfenmao
electronDownload:
mirror: https://npmmirror.com/mirrors/electron/
afterSign: scripts/notarize.js

View File

@ -4,6 +4,7 @@ import windowStateKeeper from 'electron-window-state'
import { join } from 'path'
import icon from '../../resources/icon.png?asset'
import installExtension, { REDUX_DEVTOOLS } from 'electron-devtools-installer'
import { autoUpdater } from 'electron-updater'
function createWindow(): void {
// Load the previous state with fallback to defaults
@ -102,5 +103,7 @@ app.on('window-all-closed', () => {
}
})
autoUpdater.checkForUpdatesAndNotify()
// In this file you can include the rest of your app"s specific main process
// code. You can also put them in separate files and require them here.