-
Notifications
You must be signed in to change notification settings - Fork 0
42 lines (35 loc) · 973 Bytes
/
main.yml
File metadata and controls
42 lines (35 loc) · 973 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
name: Build Windows Executable
# Trigger the workflow on push to main branch
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
runs-on: windows-latest
steps:
# Checkout the code
- name: Checkout code
uses: actions/checkout@v4
# Set up Python
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.11'
# Install dependencies
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pyinstaller
if (Test-Path requirements.txt) { pip install -r requirements.txt }
# Build executable
- name: Build executable
run: |
pyinstaller --onefile --name Question Question.py
# Upload the executable as artifact
- name: Upload executable
uses: actions/upload-artifact@v3
with:
name: windows-executable
path: dist/Question.exe