-
Notifications
You must be signed in to change notification settings - Fork 54
79 lines (69 loc) · 2.05 KB
/
pyinstaller-win-shawn.yml
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
name: dev_shawn分支自动打包
on:
push:
branches:
- dev_shawn
jobs:
build-win-amd64:
runs-on: windows-latest
steps:
- name: download source
uses: actions/checkout@v3
with:
path: main
- name: download updater
uses: actions/checkout@v3
with:
repository: ArkMowers/updater
path: updater
- name: setup nodejs 16
uses: actions/setup-node@v3
with:
node-version: 16
- name: Install UPX
uses: crazy-max/ghaction-upx@v2
with:
install-only: true
- name: Set up Python 3.8 amd64
uses: actions/setup-python@v4
with:
python-version: 3.8
cache: pip
architecture: x64
- name: build frontend
working-directory: ./main/ui
shell: bash
run: |
npm ci
npm run build
cp -r dist ../
- name: Install dependencies
working-directory: ./main
shell: cmd
run: |
python -m venv venv
venv\Scripts\pip install -r requirements.txt
venv\Scripts\pip install pyinstaller xxhash backports.zoneinfo[tzdata]
- name: Patch Paddle
working-directory: ./main
shell: cmd
run: |
copy .\packaging\image.py .\venv\Lib\site-packages\paddle\dataset\image.py /y
copy .\packaging\network.py .\venv\Lib\site-packages\paddleocr\ppocr\utils\network.py /y
copy .\packaging\paddleocr.py .\venv\Lib\site-packages\paddleocr\paddleocr.py /y
- name: Make package
working-directory: ./main
shell: cmd
run: |
set PYTHONHASHSEED=114514
set SOURCE_DATE_EPOCH=1694076231
venv\Scripts\pyinstaller .\webui_zip.spec
- name: calculate hash
working-directory: ./main/dist/mower
shell: cmd
run: |
..\..\venv\Scripts\python.exe ..\..\..\updater\publish.py
- uses: actions/upload-artifact@v3
with:
name: mower
path: main/dist/mower