Skip to content

Commit b9a82aa

Browse files
Create main.yml
1 parent 618fa05 commit b9a82aa

File tree

1 file changed

+40
-0
lines changed

1 file changed

+40
-0
lines changed

.github/workflows/main.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Build Executables
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
jobs:
10+
build:
11+
# Используем стратегию матрицы для сборки на разных ОС
12+
strategy:
13+
matrix:
14+
os: [ubuntu-latest, windows-latest, macos-latest]
15+
runs-on: ${{ matrix.os }}
16+
17+
steps:
18+
- name: Checkout code
19+
uses: actions/checkout@v3
20+
21+
- name: Set up Python
22+
uses: actions/setup-python@v4
23+
with:
24+
python-version: '3.12' # можно указать нужную версию
25+
26+
- name: Install dependencies
27+
run: |
28+
python -m pip install --upgrade pip
29+
pip install pyinstaller
30+
pip install -r requirements.txt
31+
32+
- name: Build Executable
33+
run: |
34+
pyinstaller --onefile --windowed --icon=icon.ico --name=KnigavuheDownloader --add-data "icon.png;." main.py
35+
36+
- name: Archive Build Artifacts
37+
uses: actions/upload-artifact@v3
38+
with:
39+
name: executable-${{ matrix.os }}
40+
path: dist/

0 commit comments

Comments
 (0)