Skip to content

fix: download voice model assets in CI before building #2

fix: download voice model assets in CI before building

fix: download voice model assets in CI before building #2

Workflow file for this run

name: Unix Release
on:
workflow_dispatch:
push:
tags:
- "v*"
permissions:
contents: write
jobs:
build-unix-release:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
- name: Cache Rust build outputs
uses: Swatinem/rust-cache@v2
- name: Install Linux build dependencies
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install -y libasound2-dev libpcaudio-dev libsonic-dev
- name: Download voice model assets
run: |
mkdir -p .hematite/assets/voice
base="https://huggingface.co/hexgrad/Kokoro-82M/resolve/main"
curl -L --retry 3 --max-time 300 -o .hematite/assets/voice/kokoro-v1.0.onnx "$base/kokoro-v1.0.onnx"
curl -L --retry 3 --max-time 120 -o .hematite/assets/voice/voices.bin "$base/voices.bin"
- name: Build portable archive
shell: bash
run: bash ./scripts/package-unix.sh
- name: Upload packaged artifacts
uses: actions/upload-artifact@v4
with:
name: hematite-${{ runner.os }}
path: dist/*/*.tar.gz
- name: Publish GitHub release assets
if: startsWith(github.ref, 'refs/tags/')
uses: softprops/action-gh-release@v2
with:
files: dist/*/*.tar.gz