-
Notifications
You must be signed in to change notification settings - Fork 0
96 lines (83 loc) · 2.38 KB
/
Copy pathdesktop.yml
File metadata and controls
96 lines (83 loc) · 2.38 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
name: Desktop builds
on:
workflow_dispatch:
workflow_call:
inputs:
ref:
description: Git ref to check out (tag, branch, or SHA)
type: string
required: false
default: ""
permissions:
contents: read
concurrency:
group: desktop-build-${{ inputs.ref || github.ref }}
cancel-in-progress: true
jobs:
build:
name: ${{ matrix.label }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
label: Linux
electron_args: --linux AppImage deb
- os: windows-latest
label: Windows
electron_args: --win nsis
- os: macos-latest
label: macOS
electron_args: --mac dmg zip
defaults:
run:
shell: bash
env:
CSC_IDENTITY_AUTO_DISCOVERY: "false"
steps:
- uses: actions/checkout@v7
with:
ref: ${{ inputs.ref || github.sha }}
- uses: actions/setup-python@v7
with:
python-version: "3.12"
- uses: actions/setup-node@v7
with:
node-version: "22"
cache: npm
cache-dependency-path: |
ui/package-lock.json
desktop/package-lock.json
- name: Build UI
working-directory: ui
run: |
npm ci
npm run build
- name: Install Python package and PyInstaller
run: |
python -m pip install --upgrade pip
python -m pip install -e .
python -m pip install pyinstaller
- name: Bundle backend sidecar
run: python -m PyInstaller packaging/loadpath.spec --noconfirm --clean --distpath desktop/backend-dist
- name: Smoke-test sidecar
run: python packaging/smoke_backend.py
- name: Install desktop dependencies
working-directory: desktop
run: npm ci
- name: Build Electron app
working-directory: desktop
run: npx electron-builder --publish never ${{ matrix.electron_args }}
- name: Upload installers
uses: actions/upload-artifact@v7
with:
name: loadpath-${{ matrix.label }}
if-no-files-found: error
path: |
desktop/dist/*.AppImage
desktop/dist/*.deb
desktop/dist/*.dmg
desktop/dist/*.zip
desktop/dist/*.exe
desktop/dist/*.yml