mirror of
https://github.com/Pakobbix/StartUI-oobabooga-webui
synced 2025-11-09 18:39:40 +00:00
56 lines
1.3 KiB
YAML
56 lines
1.3 KiB
YAML
name: Package Release
|
|
on:
|
|
push:
|
|
paths:
|
|
- .github/workflows/**
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
package:
|
|
runs-on: self-hosted
|
|
strategy:
|
|
matrix:
|
|
os: [windows-latest, ubuntu-latest]
|
|
steps:
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v3
|
|
with:
|
|
python-version: 3.x
|
|
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v3
|
|
|
|
- name: Create and activate venv
|
|
run: python -m venv StartUI_env
|
|
|
|
- name: activate venv
|
|
run: |
|
|
if [ "$RUNNER_OS" == "Windows" ]; then
|
|
StartUI_env\Scripts\activate
|
|
else
|
|
source StartUI_env/bin/activate
|
|
fi
|
|
|
|
- name: Upgrade Pip
|
|
run: python -m pip install --upgrade pip
|
|
|
|
- name: Install dependencies
|
|
run: |
|
|
pip install -r requirements.txt
|
|
pip install pyinstaller
|
|
|
|
- name: Build and package
|
|
run: pyinstaller --noconfirm --onefile --windowed StartUI.py --add-data="webuiGUI.py:."
|
|
|
|
- name: deactivate venv
|
|
run: deactivate
|
|
|
|
- name: delete venv
|
|
run: rm -rf StartUI_env
|
|
|
|
- name: Upload artifacts
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
name: ${{ matrix.os }}-binary-v1.6
|
|
path: dist
|