Skip to content

Commit 5b65ddc

Browse files
committed
add actions to ui2py
1 parent 5c8a05a commit 5b65ddc

File tree

8 files changed

+159
-2
lines changed

8 files changed

+159
-2
lines changed

.github/workflows/buld.yaml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
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 Python per uv lock
14+
run: uv python install
15+
- name: Sync dependencies
16+
run: uv sync --locked --all-extras
17+
- name: Build exe via PyInstaller
18+
run: |
19+
pip install pyinstaller
20+
pyinstaller --onefile src/main.py
21+
- name: Upload build artifact
22+
uses: actions/upload-artifact@v4
23+
with:
24+
name: myapp-executable
25+
path: dist/main
26+
- name: Create GitHub Release
27+
id: create_release
28+
uses: actions/create-release@v1
29+
with:
30+
token: ${{ secrets.GITHUB_TOKEN }}
31+
tag_name: v${{ github.run_number }}
32+
release_name: Release ${{ github.run_number }}
33+
body: Automated build from ${{ github.sha }}
34+
draft: false
35+
prerelease: false
36+
- name: Upload executable to release
37+
uses: actions/upload-release-asset@v1
38+
with:
39+
upload_url: ${{ steps.create_release.outputs.upload_url }}
40+
asset_path: dist/main
41+
asset_name: myapp_${{ runner.os }}_main
42+
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)