mirror of https://github.com/Budibase/budibase.git
14 changed files with 263 additions and 16 deletions
@ -0,0 +1,58 @@ |
|||
name: Budibase Release |
|||
|
|||
on: |
|||
# Trigger the workflow on push, |
|||
# but only for the release branch |
|||
push: |
|||
branches: |
|||
- master |
|||
tags: |
|||
- 'v*' |
|||
|
|||
jobs: |
|||
release: |
|||
runs-on: ${{ matrix.os }} |
|||
|
|||
# Platforms to build on/for |
|||
strategy: |
|||
matrix: |
|||
os: [macos-latest, ubuntu-latest, windows-latest] |
|||
node-version: [10.x] |
|||
|
|||
steps: |
|||
- uses: actions/checkout@v2 |
|||
- uses: actions/setup-node@v1 |
|||
with: |
|||
node-version: ${{ matrix.node-version }} |
|||
- run: yarn |
|||
# - run: yarn lint |
|||
- run: yarn bootstrap |
|||
- run: yarn build |
|||
# - run: yarn test |
|||
|
|||
- name: Prepare for app notarization (macOS) |
|||
if: startsWith(matrix.os, 'macos') |
|||
# Import Apple API key for app notarization on macOS |
|||
run: | |
|||
mkdir -p ~/private_keys/ |
|||
echo '${{ secrets.api_key }}' > ~/private_keys/AuthKey_${{ secrets.api_key_id }}.p8 |
|||
|
|||
|
|||
- name: Build/release Electron app |
|||
uses: samuelmeuli/action-electron-builder@v1 |
|||
with: |
|||
package_root: packages/server |
|||
|
|||
# GitHub token, automatically provided to the action |
|||
# (No need to define this secret in the repo settings) |
|||
github_token: ${{ secrets.github_token }} |
|||
|
|||
mac_certs: ${{ secrets.mac_certs }} |
|||
mac_certs_password: ${{ secrets.mac_certs_password }} |
|||
|
|||
# release the app after building |
|||
release: ${{ startsWith(github.ref, 'refs/tags/v') }} |
|||
env: |
|||
# macOS notarization API key |
|||
API_KEY_ID: ${{ secrets.api_key_id }} |
|||
API_KEY_ISSUER_ID: ${{ secrets.api_key_issuer_id }} |
|||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -0,0 +1,14 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> |
|||
<plist version="1.0"> |
|||
<dict> |
|||
<key>com.apple.security.cs.allow-jit</key> |
|||
<true/> |
|||
<key>com.apple.security.cs.allow-unsigned-executable-memory</key> |
|||
<true/> |
|||
<key>com.apple.security.cs.allow-dyld-environment-variables</key> |
|||
<true/> |
|||
<key>com.apple.security.cs.disable-library-validation</key> |
|||
<true/> |
|||
</dict> |
|||
</plist> |
|||
|
After Width: | Height: | Size: 25 KiB |
@ -1,15 +1,47 @@ |
|||
const { app, BrowserWindow } = require('electron'); |
|||
const { join } = require("path") |
|||
const { homedir } = require("os") |
|||
const { app, BrowserWindow } = require("electron"); |
|||
const { join } = require("path"); |
|||
const { homedir } = require("os"); |
|||
const isDev = require("electron-is-dev"); |
|||
const { autoUpdater } = require("electron-updater"); |
|||
const unhandled = require("electron-unhandled"); |
|||
|
|||
require("dotenv").config({ path: join(homedir(), ".budibase", ".env") }) |
|||
require("dotenv").config({ path: join(homedir(), ".budibase", ".env") }); |
|||
|
|||
const DEV_URL = "http://localhost:4001"; |
|||
if (isDev) { |
|||
unhandled({ |
|||
showDialog: true |
|||
}); |
|||
} |
|||
|
|||
const APP_URL = "http://localhost:4001"; |
|||
const APP_TITLE = "Budibase Builder"; |
|||
|
|||
let win |
|||
|
|||
function createWindow() { |
|||
app.server = require("./app"); |
|||
let win = new BrowserWindow({ width: 1920, height: 1080 }); |
|||
win.loadURL(DEV_URL); |
|||
win = new BrowserWindow({ width: 1920, height: 1080 }); |
|||
win.setTitle(APP_TITLE); |
|||
win.loadURL(APP_URL); |
|||
if (isDev) { |
|||
win.webContents.openDevTools(); |
|||
} else { |
|||
autoUpdater.checkForUpdatesAndNotify(); |
|||
} |
|||
} |
|||
|
|||
app.whenReady().then(createWindow) |
|||
app.whenReady().then(createWindow) |
|||
|
|||
|
|||
// Quit when all windows are closed.
|
|||
app.on("window-all-closed", () => { |
|||
// On macOS it is common for applications and their menu bar
|
|||
// to stay active until the user quits explicitly with Cmd + Q
|
|||
if (process.platform !== "darwin") app.quit(); |
|||
}); |
|||
|
|||
app.on("activate", () => { |
|||
// On macOS it's common to re-create a window in the app when the
|
|||
// dock icon is clicked and there are no other windows open.
|
|||
if (win === null) createWindow(); |
|||
}); |
|||
Loading…
Reference in new issue