@@ -17,14 +17,11 @@ jobs:
17
17
18
18
steps :
19
19
- name : Check out git repository
20
- # ---> ВАЖНОЕ ИЗМЕНЕНИЕ: Указываем fetch-depth: 0 <---
21
- # Это нужно, чтобы electron-builder мог правильно работать с тегами Git
22
20
uses : actions/checkout@v4
23
21
with :
24
- fetch-depth : 0
25
-
26
- # ... (все шаги до "Build and release" остаются без изменений) ...
22
+ fetch-depth : 0
27
23
24
+ # --- [БЛОК 1] Сборка исполняемого файла аналитики ---
28
25
- name : Set up Python
29
26
uses : actions/setup-python@v5
30
27
with :
43
40
- name : Build analytics executable
44
41
run : python -m PyInstaller --onefile python_src/analytics.py --distpath extra/analytics --name analytics
45
42
43
+ # --- [БЛОК 2] Сборка Electron-приложения ---
46
44
- name : Setup Node.js
47
45
uses : actions/setup-node@v4
48
46
with :
@@ -56,17 +54,19 @@ jobs:
56
54
if : runner.os == 'Linux'
57
55
run : sudo apt-get update && sudo apt-get install -y libfuse2
58
56
59
- # ---> ИЗМЕНЁН ЭТОТ ШАГ <---
60
- - name : Build and release Electron app
57
+ # ---> ИЗМЕНЁН ЭТОТ БЛОК: РАЗДЕЛЕН НА ДВА <---
58
+ - name : Build and release for Linux
59
+ if : runner.os == 'Linux'
61
60
env :
62
61
GITHUB_TOKEN : ${{ secrets.GH_TOKEN }}
63
62
run : |
64
- if [ "${{ runner.os }}" == "Linux" ]; then
65
- FUSE_PATH=$(readlink -f /usr/lib/x86_64-linux-gnu/libfuse.so.2)
66
- echo "FUSE library found at: $FUSE_PATH"
67
- EXTRA_FILES_CONFIG='[{"from": "'"$FUSE_PATH"'", "to": "lib/libfuse.so.2"}]'
68
- # Добавляем --winPortable, чтобы собрать и portable-версию для Windows, если нужно
69
- npm run dist -- --publish always --config.linux.extraFiles="$EXTRA_FILES_CONFIG"
70
- else
71
- npm run dist -- --publish always
72
- fi
63
+ FUSE_PATH=$(readlink -f /usr/lib/x86_64-linux-gnu/libfuse.so.2)
64
+ echo "FUSE library found at: $FUSE_PATH"
65
+ EXTRA_FILES_CONFIG='[{"from": "'"$FUSE_PATH"'", "to": "lib/libfuse.so.2"}]'
66
+ npm run dist -- --publish always --config.linux.extraFiles="$EXTRA_FILES_CONFIG"
67
+
68
+ - name : Build and release for Windows
69
+ if : runner.os == 'Windows'
70
+ env :
71
+ GITHUB_TOKEN : ${{ secrets.GH_TOKEN }}
72
+ run : npm run dist -- --publish always
0 commit comments