-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5114225
commit cf1a804
Showing
1 changed file
with
38 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
name: Build Executable | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
workflow_dispatch: # Allows manual triggers from GitHub UI | ||
|
||
jobs: | ||
build: | ||
runs-on: windows-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: '3.12' # Replace with your Python version | ||
|
||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install -r requirements.txt | ||
- name: Build executable | ||
run: | | ||
pyinstaller --onefile your_script.py | ||
- name: Upload executable | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: my-executable | ||
path: dist/pyos.exe | ||
|
||
- name: Clean up | ||
run: | | ||
rm -rf build dist __pycache__ your_script.spec |