File tree Expand file tree Collapse file tree 1 file changed +42
-0
lines changed Expand file tree Collapse file tree 1 file changed +42
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Build Windows Executable
2
+
3
+ # Trigger the workflow on push to main branch
4
+ on :
5
+ push :
6
+ branches : [ main ]
7
+ pull_request :
8
+ branches : [ main ]
9
+
10
+ jobs :
11
+ build :
12
+ runs-on : windows-latest
13
+
14
+ steps :
15
+ # Checkout the code
16
+ - name : Checkout code
17
+ uses : actions/checkout@v4
18
+
19
+ # Set up Python
20
+ - name : Set up Python
21
+ uses : actions/setup-python@v4
22
+ with :
23
+ python-version : ' 3.11'
24
+
25
+ # Install dependencies
26
+ - name : Install dependencies
27
+ run : |
28
+ python -m pip install --upgrade pip
29
+ pip install pyinstaller
30
+ if (Test-Path requirements.txt) { pip install -r requirements.txt }
31
+
32
+ # Build executable
33
+ - name : Build executable
34
+ run : |
35
+ pyinstaller --onefile --name Question Question.py
36
+
37
+ # Upload the executable as artifact
38
+ - name : Upload executable
39
+ uses : actions/upload-artifact@v3
40
+ with :
41
+ name : windows-executable
42
+ path : dist/Question.exe
You can’t perform that action at this time.
0 commit comments