- 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`.
42 lines
1.3 KiB
YAML
42 lines
1.3 KiB
YAML
name: release-desktop
|
|
|
|
on:
|
|
release:
|
|
types: [created] # will be triggered when a NON-draft release is created and published.
|
|
|
|
jobs:
|
|
publish-desktop-app:
|
|
name: ${{ matrix.os }}
|
|
strategy:
|
|
matrix:
|
|
os: [macos, ubuntu, windows]
|
|
fail-fast: false # So publish runs for other OSes if one fails
|
|
runs-on: ${{ matrix.os }}-latest
|
|
steps:
|
|
-
|
|
uses: actions/checkout@v2
|
|
with:
|
|
ref: master # otherwise it defaults to the version tag missing bump commit
|
|
fetch-depth: 0 # fetch all history
|
|
-
|
|
name: Checkout to bump commit
|
|
run: git checkout "$(git rev-list "${{ github.event.release.tag_name }}"..master | tail -1)"
|
|
-
|
|
name: Setup node
|
|
uses: ./.github/actions/setup-node
|
|
-
|
|
name: Install dependencies
|
|
run: npm ci
|
|
-
|
|
name: Run unit tests
|
|
run: npm run test:unit
|
|
-
|
|
name: Prebuild
|
|
run: npm run electron:prebuild
|
|
-
|
|
name: Build and publish
|
|
run: npm run electron:build -- --publish always
|
|
env:
|
|
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
EP_GH_IGNORE_TIME: true # Otherwise publishing fails if GitHub release is more than 2 hours old https://github.com/electron-userland/electron-builder/issues/2074
|