Files
UltraSinger/.github/workflows/release.yml
T
2023-06-17 13:57:53 +02:00

52 lines
1.3 KiB
YAML

name: Release
on:
push:
branches:
- CI
pull_request:
branches:
- CI
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
#- os: ubuntu-latest
# TARGET: Linux
#- os: macos-latest
# TARGET: macOS
- os: windows-latest
TARGET: Windows
PYINSTALLER_ARGS: "--onefile"
python-version: [ "3.10" ]
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Install gpu dependencies
if: matrix.TARGET != 'macOS'
run: pip3 install torch==2.0.1+cu117 torchvision==0.15.2+cu117 torchaudio==2.0.2+cu117 --index-url https://download.pytorch.org/whl/cu117
- name: Build with pyinstaller for ${{matrix.os}}
run: pyinstaller -n 'UltraSinger-0.0.1-${{matrix.TARGET}}' ${{matrix.PYINSTALLER_ARGS}} src/UltraSinger.py
- uses: actions/upload-artifact@v3
with:
name: artifacts
path: |
dist/*
!dist/*.app