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 Windows Executable
2+
3+ on :
4+ push :
5+ branches : [ main, master ]
6+ pull_request :
7+ branches : [ main, master ]
8+ workflow_dispatch : # Allows manual triggering from GitHub UI
9+
10+ jobs :
11+ build-windows :
12+ runs-on : windows-latest
13+
14+ steps :
15+ - name : Checkout code
16+ uses : actions/checkout@v4
17+
18+ - name : Set up Python
19+ uses : actions/setup-python@v5
20+ with :
21+ python-version : ' 3.11'
22+
23+ - name : Install dependencies
24+ run : |
25+ python -m pip install --upgrade pip
26+ pip install -r requirements.txt
27+
28+ - name : Build executable with PyInstaller
29+ run : |
30+ pyinstaller --name ctools --onefile --windowed --icon=icon.jpeg ctools.py
31+
32+ - name : List dist contents
33+ run : |
34+ dir dist
35+
36+ - name : Upload executable
37+ uses : actions/upload-artifact@v4
38+ with :
39+ name : ctools-windows-exe
40+ path : dist/ctools.exe
41+ retention-days : 90
42+
43+ - name : Create Release (on tag push)
44+ if : startsWith(github.ref, 'refs/tags/')
45+ uses : softprops/action-gh-release@v1
46+ with :
47+ files : dist/ctools.exe
48+ env :
49+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
You can’t perform that action at this time.
0 commit comments