Skip to content

Create main.yml

Create main.yml #1

Workflow file for this run

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