v0.6.3 #30
Workflow file for this run
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 Package (CPU) | |
on: | |
release: | |
types: | |
- published | |
jobs: | |
build: | |
runs-on: windows-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Download and Install Miniconda | |
run: | | |
curl -o miniconda-installer.exe https://repo.anaconda.com/miniconda/Miniconda3-latest-Windows-x86_64.exe | |
start /wait "" miniconda-installer.exe /S /D=C:\programs\miniconda3 | |
del miniconda-installer.exe | |
shell: cmd | |
- name: Set up Conda environment | |
run: | | |
C:\programs\miniconda3\Scripts\conda create -n py310 python=3.10.11 --yes | |
shell: cmd | |
- name: Activate Conda environment and Install Dependencies | |
run: | | |
call C:\programs\miniconda3\Scripts\activate C:\programs\miniconda3\envs\py310 | |
pip install --no-cache-dir torch==1.13.1 --extra-index-url https://download.pytorch.org/whl/cpu | |
pip install --extra-index-url https://pypi.artrajz.cn/simple -r requirements.txt | |
shell: cmd | |
- name: Copy python environment | |
run: | | |
XCOPY C:\programs\miniconda3\envs\py310 py310\ /E /Y /F | |
shell: cmd | |
- name: Create 'start.bat' | |
run: | | |
echo @echo off >> start.bat | |
echo py310\python.exe app.py >> start.bat | |
echo pause >> start.bat | |
shell: cmd | |
- name: Create 7z Archive | |
run: | | |
7z a -t7z -m0=LZMA "vits-simple-api-windows-cpu-${{ github.event.release.tag_name }}.7z" . | |
shell: cmd | |
- name: Upload Release Artifacts | |
if: startsWith(github.ref, 'refs/tags/') | |
uses: softprops/action-gh-release@v1 | |
with: | |
files: | | |
vits-simple-api-windows-cpu-${{ github.event.release.tag_name }}.7z | |
token: ${{ secrets.RELEASE_TOKEN }} |