Skip to content

Commit

Permalink
Fix up build action and add auto-updater
Browse files Browse the repository at this point in the history
  • Loading branch information
LordTocs committed May 30, 2021
1 parent 4461ada commit 0a0977e
Show file tree
Hide file tree
Showing 5 changed files with 108 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,6 @@ jobs:
- name: "Install Node Packages"
run: "npm install"
- name: "Build"
run: "npm run electron:build -p always"
run: "npm run electron:build -- -p always"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
102 changes: 97 additions & 5 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
"custom-electron-titlebar": "^3.2.6",
"electron": "^11.0.0",
"electron-serve": "^1.1.0",
"electron-updater": "^4.3.9",
"express": "^4.17.1",
"ffi-napi": "^4.0.1",
"got": "^11.8.2",
Expand Down Expand Up @@ -83,8 +84,8 @@
"parser": "babel-eslint"
},
"rules": {
"strict": "off"
}
"strict": "off"
}
},
"browserslist": [
"> 1%",
Expand Down
2 changes: 2 additions & 0 deletions src/background.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { app, protocol, BrowserWindow } from 'electron'
import { createProtocol } from 'vue-cli-plugin-electron-builder/lib'
import installExtension, { VUEJS_DEVTOOLS } from 'electron-devtools-installer'
import { initCastMate } from './core/castmate'
import { autoUpdater } from 'electron-updater';
const isDevelopment = process.env.NODE_ENV !== 'production'

// Scheme must be registered before the app is ready
Expand Down Expand Up @@ -82,6 +83,7 @@ app.on('ready', async () =>
}
initCastMate()
createWindow()
autoUpdater.checkForUpdatesAndNotify();
})

// Exit cleanly on request from parent process in development mode.
Expand Down
6 changes: 5 additions & 1 deletion vue.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,11 @@ module.exports = {
externals: ["win32-api", "ffi-napi", "ref-napi", "node-gyp-build", "@peter-murray/hue-bridge-model", "node-hue-api", "jsdom", "canvas", "chokidar"],
nodeIntegration: true,
builderOptions: {
publish: ['github'],
publish: [{
provider: 'github',
owner: "LordTocs",
repo: "CastMate"
}],
productName: "CastMate",
}
}
Expand Down

0 comments on commit 0a0977e

Please sign in to comment.