-
Notifications
You must be signed in to change notification settings - Fork 9
48 lines (41 loc) · 1.52 KB
/
build_windows.yml
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
43
44
45
46
47
48
name: Build Windows Executable
on:
push:
branches:
- dev # Adjust branch name as needed
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.4 # Specify the Python version you need
- name: Create virtual environment
run: |
python -m venv .env
.env\Scripts\activate # Activate the virtual environment
python -m pip install --upgrade pip
pip install -r requirements.txt # Replace with your requirements file if exists
- name: Build executable
run: |
.env\Scripts\activate # Activate the virtual environment
pyinstaller --paths .env\Lib\site-packages \
--hidden-import requests \
--hidden-import inquirer \
--hidden-import alive_progress \
--hidden-import termcolor \
--hidden-import xmltodict \
--add-data=".env\Lib\site-packages\grapheme\data\*;grapheme/data/" \
--onefile \
--icon "icon.ico" \
--console \
--name "NN-Downloader" \
main.py
- name: Upload artifact
uses: actions/upload-artifact@v2
with:
name: nn-downloader-windows
path: dist/NN-Downloader.exe # Adjust the path to your executable relative to the root of the repository