Skip to content

Commit e4c7377

Browse files
committed
add actions to build
1 parent e8b4f53 commit e4c7377

File tree

8 files changed

+176
-2
lines changed

8 files changed

+176
-2
lines changed

.github/workflows/buld.yaml

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
name: Build & Release executable
2+
on:
3+
push:
4+
branches: [main]
5+
jobs:
6+
build-and-release:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- name: Checkout repo
10+
uses: actions/checkout@v4
11+
- name: Install uv tool
12+
uses: astral-sh/setup-uv@v5
13+
- name: Install system deps
14+
run: |
15+
sudo apt-get update
16+
sudo apt-get install -y \
17+
python3-dev \
18+
libcairo2-dev \
19+
libgirepository1.0-dev \
20+
gir1.2-gtk-3.0 \
21+
pkg-config \
22+
build-essential \
23+
libglib2.0-dev \
24+
libgirepository-1.0-1 \
25+
gobject-introspection \
26+
libgirepository-2.0-dev \
27+
gobject-introspection \
28+
pkg-config \
29+
cmake
30+
- name: Install Python per uv lock
31+
run: uv python install
32+
- name: Sync dependencies
33+
run: uv sync --locked --all-extras
34+
- name: Build exe via PyInstaller
35+
run: |
36+
pip install pyinstaller
37+
pyinstaller --onefile src/main.py
38+
- name: Upload build artifact
39+
uses: actions/upload-artifact@v4
40+
with:
41+
name: myapp-executable
42+
path: dist/main
43+
- name: Create GitHub Release
44+
id: create_release
45+
uses: actions/create-release@v1
46+
with:
47+
token: ${{ secrets.GITHUB_TOKEN }}
48+
tag_name: v${{ github.run_number }}
49+
release_name: Release ${{ github.run_number }}
50+
body: Automated build from ${{ github.sha }}
51+
draft: false
52+
prerelease: false
53+
- name: Upload executable to release
54+
uses: actions/upload-release-asset@v1
55+
with:
56+
upload_url: ${{ steps.create_release.outputs.upload_url }}
57+
asset_path: dist/main
58+
asset_name: myapp_${{ runner.os }}_main
59+
asset_content_type: application/octet-stream

.github/workflows/ui2py.yaml

Whitespace-only changes.

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,7 @@ venv
22
__pycache__
33
db
44
data_base
5+
build
6+
dist
7+
*.spec
8+
*.pyc

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ You can find details on the remaining classes in [`docs`](/docs) directory.
7272
### How to run it
7373
One command with `uv`:
7474
```sh
75-
uv run python schoolring/views.py
75+
uv run python schoolring
7676
```
7777

7878
### Questions | Contribute

docs/technical_specification.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,4 +145,4 @@
145145
- `LginData` и `RegistrData` оба класса наледоются от NamedTuple и используются для храниения, передачи, введёных пользователем, данных.
146146
- `RingManager` агрегирует данные рассписаня и воспроизведение мелодии
147147
- `LoginChecker` и `RegistrChecker` у каждого из классов есть свойство `is_correct` котрое равно True если данные веднеы коректно и проходят проверку. Или False во всех остальных случаях
148-
- `DataBaseManager` экземпляры этого класса могут создаваться в других классах и “брать на себя” всё управление базой даных
148+
- `DataBaseManager` экземпляры этого класса могут создаваться в других классах и “брать на себя” всё управление базой даных

pyproject.toml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,8 @@ dependencies = [
1313
"pyqt6-sip>=13.10.2",
1414
"schedule>=1.2.2",
1515
]
16+
17+
[dependency-groups]
18+
dev = [
19+
"pyinstaller>=6.14.0",
20+
]

uv.lock

Lines changed: 106 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)