Merge pull request #93 from Flippchen/dev #93
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build and Export Binary | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- main | |
release: | |
types: [ published ] | |
jobs: | |
build-linux: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out repository | |
uses: actions/checkout@v2 | |
- name: Set up Python 3.10 | |
uses: actions/setup-python@v2 | |
with: | |
python-version: '3.10' | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r web_ui/build_requirements.txt | |
pip install PyInstaller | |
- name: Build binary with PyInstaller | |
run: | | |
cd web_ui/ | |
python -m eel main.py web --add-data "../utilities/class_names.py:utilities" --add-data "../utilities/prepare_images.py:utilities" --collect-submodules rembg --onefile | |
- name: Archive binary | |
uses: actions/upload-artifact@v2 | |
with: | |
name: car-classifier-linux | |
path: web_ui/dist/ | |
build-windows: | |
runs-on: windows-latest | |
steps: | |
- name: Check out repository | |
uses: actions/checkout@v2 | |
- name: Set up Python 3.10 | |
uses: actions/setup-python@v2 | |
with: | |
python-version: '3.10' | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r web_ui/build_requirements.txt | |
pip install PyInstaller | |
pip install eel | |
- name: Build binary with PyInstaller | |
run: | | |
cd web_ui/ | |
python -m eel main.py web --add-data "..\utilities\class_names.py;utilities" --add-data "..\utilities\prepare_images.py;utilities" --collect-submodules rembg --onefile --noconsole | |
- name: Archive binary | |
uses: actions/upload-artifact@v2 | |
with: | |
name: car-classifier-windows | |
path: web_ui/dist/ | |
build-macos: | |
runs-on: macos-latest | |
steps: | |
- name: Check out repository | |
uses: actions/checkout@v2 | |
- name: Set up Python 3.10 | |
uses: actions/setup-python@v2 | |
with: | |
python-version: '3.10' | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r web_ui/build_requirements.txt | |
pip install PyInstaller | |
pip install eel | |
- name: Build binary with PyInstaller | |
run: | | |
cd web_ui/ | |
python -m eel main.py web --add-data "../utilities/class_names.py:utilities" --add-data "../utilities/prepare_images.py:utilities" --collect-submodules rembg --onefile --noconsole | |
- name: Archive binary | |
uses: actions/upload-artifact@v2 | |
with: | |
name: car-classifier-macos | |
path: web_ui/dist/ |