File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Build Tkinter Application
2+
3+ on :
4+ push :
5+ branches : [ main, master ]
6+ pull_request :
7+ branches : [ main, master ]
8+
9+ jobs :
10+ build :
11+ runs-on : ubuntu-latest
12+
13+ steps :
14+ - uses : actions/checkout@v4
15+
16+ - name : Set up Python
17+ uses : actions/setup-python@v5
18+ with :
19+ python-version : ' 3.12' # Match your local Python version
20+
21+ - name : Install system dependencies
22+ run : |
23+ sudo apt-get update
24+ sudo apt-get install -y python3-tk xvfb
25+
26+ - name : Install Poetry
27+ uses : snok/install-poetry@v1
28+ with :
29+ virtualenvs-create : true
30+ virtualenvs-in-project : true
31+
32+ - name : Load cached venv
33+ id : cached-poetry-deps
34+ uses : actions/cache@v3
35+ with :
36+ path : |
37+ .venv
38+ ~/.cache/pypoetry
39+ key : venv-${{ runner.os }}-${{ hashFiles('pyproject.toml') }}
40+
41+ - name : Install dependencies
42+ run : |
43+ poetry install --no-interaction --no-root
44+ poetry install
45+
46+ - name : Install PyInstaller via Poetry
47+ run : poetry add pyinstaller --group dev
48+
49+ - name : Run tests (if any)
50+ run : |
51+ xvfb-run poetry run pytest tests/
52+
53+ - name : Build with PyInstaller
54+ run : |
55+ poetry run pyinstaller \
56+ --onefile \
57+ --windowed \
58+ --name GPGap-linux \
59+ gpgap.py
60+
61+ - name : Upload artifact
62+ uses : actions/upload-artifact@v3
63+ with :
64+ name : GPGap-linux
65+ path : dist/
66+ if-no-files-found : error
You can’t perform that action at this time.
0 commit comments