From cf1a804fafea3ea434b8f784d310cc7212fe080d Mon Sep 17 00:00:00 2001 From: Yatin Anchan <70430444+warlord1901t@users.noreply.github.com> Date: Fri, 2 Aug 2024 23:15:12 +0530 Subject: [PATCH] Create main.yml --- .github/workflows/main.yml | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 .github/workflows/main.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..5f722e2 --- /dev/null +++ b/.github/workflows/main.yml @@ -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