Skip to content

Commit

Permalink
Create build.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
MishaGalin authored Jan 13, 2025
1 parent 2d56d36 commit ffba643
Showing 1 changed file with 43 additions and 0 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Build and Upload Executable

on:
push:
branches:
- master
pull_request:
branches:
- master

jobs:
build:
runs-on: windows-latest

steps:
# Checkout the repository
- name: Checkout code
uses: actions/checkout@v3

# Set up Python
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.10'

# Install dependencies
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
# Build executable with PyInstaller
- name: Build executable
run: |
pip install pyinstaller
pyinstaller --onefile --noconsole brightness_control.py
# Upload the built .exe file as an artifact
- name: Upload executable
uses: actions/upload-artifact@v3
with:
name: brightness_control_exe
path: dist/brightness_control.exe

0 comments on commit ffba643

Please sign in to comment.