- Switch from deprecated Vue CLI plugin to `electron-vite` (see nklayman/vue-cli-plugin-electron-builder#1982) - Update main/preload scripts to use `index.cjs` filenames to support `"type": "module"`, resolving crash issue (#233). This crash was related to Electron not supporting ESM (see electron/asar#249, electron/electron#21457). - This commit completes migration to Vite from Vue CLI (#230). Structure changes: - Introduce separate folders for Electron's main and preload processes. - Move TypeHelpers to `src/` to mark tit as accessible by the rest of the code. Config changes: - Make `vite.config.ts` reusable by Electron configuration. - On electron-builder, use `--publish` flag instead of `-p` for clarity. Tests: - Add log for preload script loading verification. - Implement runtime environment sanity checks. - Enhance logging in `check-desktop-runtime-errors`.
82 lines
2.1 KiB
YAML
82 lines
2.1 KiB
YAML
name: build-checks
|
|
|
|
on:
|
|
push:
|
|
pull_request:
|
|
|
|
jobs:
|
|
build-web:
|
|
strategy:
|
|
matrix:
|
|
os: [ macos, ubuntu, windows ]
|
|
mode: [
|
|
# Vite mode: https://vitejs.dev/guide/env-and-mode.html
|
|
development, # Used by `dev` command
|
|
production, # Used by `build` command
|
|
# Vitest mode: https://vitest.dev/guide/cli.html
|
|
test, # Used by Vitest
|
|
]
|
|
fail-fast: false # Allows to see results from other combinations
|
|
runs-on: ${{ matrix.os }}-latest
|
|
steps:
|
|
-
|
|
name: Checkout
|
|
uses: actions/checkout@v2
|
|
-
|
|
name: Setup node
|
|
uses: ./.github/actions/setup-node
|
|
-
|
|
name: Install dependencies
|
|
run: npm ci
|
|
-
|
|
name: Build
|
|
run: npm run build -- --mode ${{ matrix.mode }}
|
|
|
|
build-desktop:
|
|
strategy:
|
|
matrix:
|
|
os: [ macos, ubuntu, windows ]
|
|
mode: [
|
|
# electron-vite modes: https://electron-vite.org/guide/env-and-mode.html#global-env-variables
|
|
development, # Used by `dev` command
|
|
production, # Used by `build` and `preview` commands
|
|
]
|
|
fail-fast: false # Allows to see results from other combinations
|
|
runs-on: ${{ matrix.os }}-latest
|
|
steps:
|
|
-
|
|
name: Checkout
|
|
uses: actions/checkout@v2
|
|
-
|
|
name: Setup node
|
|
uses: ./.github/actions/setup-node
|
|
-
|
|
name: Install dependencies
|
|
run: npm ci
|
|
-
|
|
name: Prebuild
|
|
run: npm run electron:prebuild -- --mode ${{ matrix.mode }}
|
|
-
|
|
name: Build
|
|
run: npm run electron:build -- --publish never
|
|
|
|
create-icons:
|
|
strategy:
|
|
matrix:
|
|
os: [ macos, ubuntu, windows ]
|
|
fail-fast: false # Allows to see results from other combinations
|
|
runs-on: ${{ matrix.os }}-latest
|
|
steps:
|
|
-
|
|
name: Checkout
|
|
uses: actions/checkout@v2
|
|
-
|
|
name: Setup node
|
|
uses: ./.github/actions/setup-node
|
|
-
|
|
name: Install dependencies
|
|
run: npm ci
|
|
-
|
|
name: Create icons
|
|
run: npm run icons:build
|