-
-
Notifications
You must be signed in to change notification settings - Fork 2
51 lines (50 loc) · 1.72 KB
/
build-win.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
49
50
51
name: Windows Build
on:
push:
branches: [ main ]
workflow_dispatch:
jobs:
build-win:
if: contains(github.event.head_commit.message, '[build-win]' ) || github.event_name == 'workflow_dispatch' # only run if commit message contains [build]
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.10
uses: actions/setup-python@v5
with:
python-version: 3.10
# - name: Install dependencies
# run: |
# python -m pip install --upgrade pip
# pip install -r requirements.txt
# pip install pyinstaller
# - name: Build Windows Binary
# run: |
# pyinstaller --onefile oai.py --distpath dist/
# mkdir out && cd dist && Compress-Archive -Path . -DestinationPath ../out/oai-windows-standalone.zip
# cd ..
- name: Install pynsist
run: |
pip install pynsist
- name: Build openai wheel
run: |
mkdir pynsist_whls
mkdir out
git clone --single-branch --branch v0.26.4 https://github.com/openai/openai-python
cd openai-python
pip wheel . -w ../pynsist_whls
- name: Build Windows-Installer
run: |
cp resources/install/win/installer.cfg installer.cfg
pynsist installer.cfg
cp build/nsis/oai-windows-installer.exe out/oai-windows-installer.exe
- name: Upload Release Windows
uses: actions/upload-artifact@v4
with:
name: Windows Binary
path: out/oai-windows-installer.exe
# - name: Upload Release Windows
# uses: actions/upload-artifact@v3
# with:
# name: Windows Binary
# path: out/oai-windows-standalone.zip