updated and add workflow

This commit is contained in:
Sambo Chea 2020-02-13 12:42:46 +07:00
parent 9aa8370b3d
commit 20dfc4429f
3 changed files with 62 additions and 2 deletions

52
.github/workflows/electron.yml vendored Normal file
View File

@ -0,0 +1,52 @@
name: Sandbox Clinic Electron CD
on: [push]
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macOS-latest]
steps:
- name: Context
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
run: echo "$GITHUB_CONTEXT"
- uses: actions/checkout@v1
with:
fetch-depth: 1
- name: Use Node.js 10.x
uses: actions/setup-node@v1
with:
node-version: 10.x
- name: yarn install
run: |
yarn install
- name: Publish
run: |
yarn run dist
- name: Cleanup artifacts
if: matrix.os != 'windows-latest'
run: |
mkdir artifacts
mv "dist/(*.exe,*.deb,*.AppImage,*.dmg)" artifacts || true
- name: Cleanup artifacts Win
if: matrix.os == 'windows-latest'
run: |
mkdir artifacts
mv dist/*.exe artifacts
- name: Upload artifacts
uses: actions/upload-artifact@v1
with:
name: ${{matrix.os}}
path: artifacts
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: "artifacts/**"
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}

View File

@ -1,7 +1,12 @@
const electron = require("electron");
const { app, BrowserWindow } = electron;
const Store = require("electron-store");
let mainWindow;
const store = new Store();
store.set('unicorn', '🦄');
console.log(store.get('unicorn'));
app.on("ready", () => {
mainWindow = new BrowserWindow({
@ -9,7 +14,8 @@ app.on("ready", () => {
height: 700
});
mainWindow.setTitle("CUBETIQ Clinic");
mainWindow.setFullScreen(true)
mainWindow.setTitle("DR PROFESSIONAL CLINIC");
mainWindow.loadURL("http://clinic.cubetiq.online");
mainWindow.on("closed", () => {

View File

@ -19,7 +19,9 @@
"icon": "build/icon.ico"
}
},
"dependencies": {},
"dependencies": {
"electron-store": "^5.1.0"
},
"devDependencies": {
"electron": "^8.0.0",
"electron-builder": "^22.3.2"