Skip to content

Commit ebaea3f

Browse files
committed
ci: Add GitHub Actions workflow for build and release
1 parent 19d7933 commit ebaea3f

File tree

2 files changed

+17
-17
lines changed

2 files changed

+17
-17
lines changed

.github/workflows/release.yml

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,11 @@ jobs:
1717

1818
steps:
1919
- name: Check out git repository
20-
# ---> ВАЖНОЕ ИЗМЕНЕНИЕ: Указываем fetch-depth: 0 <---
21-
# Это нужно, чтобы electron-builder мог правильно работать с тегами Git
2220
uses: actions/checkout@v4
2321
with:
24-
fetch-depth: 0
25-
26-
# ... (все шаги до "Build and release" остаются без изменений) ...
22+
fetch-depth: 0
2723

24+
# --- [БЛОК 1] Сборка исполняемого файла аналитики ---
2825
- name: Set up Python
2926
uses: actions/setup-python@v5
3027
with:
@@ -43,6 +40,7 @@ jobs:
4340
- name: Build analytics executable
4441
run: python -m PyInstaller --onefile python_src/analytics.py --distpath extra/analytics --name analytics
4542

43+
# --- [БЛОК 2] Сборка Electron-приложения ---
4644
- name: Setup Node.js
4745
uses: actions/setup-node@v4
4846
with:
@@ -56,17 +54,19 @@ jobs:
5654
if: runner.os == 'Linux'
5755
run: sudo apt-get update && sudo apt-get install -y libfuse2
5856

59-
# ---> ИЗМЕНЁН ЭТОТ ШАГ <---
60-
- name: Build and release Electron app
57+
# ---> ИЗМЕНЁН ЭТОТ БЛОК: РАЗДЕЛЕН НА ДВА <---
58+
- name: Build and release for Linux
59+
if: runner.os == 'Linux'
6160
env:
6261
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
6362
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

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "openipc-dashboard",
3-
"version": "2.7.7",
3+
"version": "2.7.8",
44
"description": "App for managing OpenIPC cameras",
55
"main": "main.js",
66
"scripts": {

0 commit comments

Comments
 (0)