-
Notifications
You must be signed in to change notification settings - Fork 1
54 lines (42 loc) · 1.22 KB
/
Copy pathrelease.yml
File metadata and controls
54 lines (42 loc) · 1.22 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
name: Publish Electron App to Github Release
on:
push:
branches:
- main
jobs:
build_and_release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install dependencies
run: npm install
- name: Create Python virtual environment
run: python3 -m venv .venv
- name: Activate Python virtual environment
run: |
if (IsWindows()) {
.\.venv\Scripts\Activate.ps1
} else {
source .venv/bin/activate
}
- name: Install Python dependencies
run: pip install -r requirements.txt
- name: Build Electron app
run: pyinstaller.exe projects/main/src/main.py
- name: Copy data files
run: cp -r projects/main/data dist
- name: Build frontend
run: npm-run-all -s build:el build:ng
- name: Publish Electron app to Github Release
uses: softprops/action-gh-release@v4
with:
token: ${{ secrets.ACCESS_TOKEN }}
files: dist/my-app-*.{exe,zip,dmg}
- name: Cleanup
run: |
if (IsWindows()) {
.\.venv\Scripts\Deactivate.ps1
} else {
deactivate
}
rm -rf .venv