Skip to content

Fixed build-lin4

Fixed build-lin4 #24

Workflow file for this run

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