Skip to content

Linuxの依存関係を更新 (#24) #5

Linuxの依存関係を更新 (#24)

Linuxの依存関係を更新 (#24) #5

Workflow file for this run

name: Release
on:
push:
tags:
- "v[0-9]+.[0-9]+.[0-9]+"
jobs:
build-tauri:
strategy:
fail-fast: false
matrix:
platform:
[macos-latest, ubuntu-22.04, windows-latest, "ubuntu-22.04-arm"]
runs-on: ${{ matrix.platform }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
- uses: denoland/setup-deno@v2
with:
deno-version: v2.x
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
# For macOS universal builds
targets: aarch64-apple-darwin,x86_64-apple-darwin
- name: Install dependencies (Ubuntu)
if: startsWith(matrix.platform, 'ubuntu')
run: |
sudo apt-get update
sudo apt install libwebkit2gtk-4.1-dev \
build-essential \
curl \
wget \
file \
libxdo-dev \
libssl-dev \
libayatana-appindicator3-dev \
librsvg2-dev
- name: Download and set up voicevox_core
shell: bash
env:
LC_ALL: C.UTF-8
LANG: C.UTF-8
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
# Determine OS and Arch for downloader
if [[ "${{ runner.os }}" == "Linux" ]]; then
OS="linux"
elif [[ "${{ runner.os }}" == "macOS" ]]; then
OS="osx"
elif [[ "${{ runner.os }}" == "Windows" ]]; then
OS="windows"
fi
if [[ "${{ runner.arch }}" == "X64" ]]; then
ARCH="x64"
elif [[ "${{ runner.arch }}" == "ARM64" ]]; then
ARCH="arm64"
else
echo "Unsupported architecture: ${{ runner.arch }}"
exit 1
fi
DOWNLOADER_NAME="download-${OS}-${ARCH}"
if [[ "${{ runner.os }}" == "Windows" ]]; then
DOWNLOADER_NAME="${DOWNLOADER_NAME}.exe"
fi
echo "Downloading ${DOWNLOADER_NAME}..."
gh release download \
--repo VOICEVOX/voicevox_core \
--pattern "${DOWNLOADER_NAME}" \
--output download
if [[ "${{ runner.os }}" != "Windows" ]]; then
chmod +x download
fi
# Run downloader
# NOTE: Using 'echo' to bypass prompts because the downloader does not support a '--yes' or '--force' flag. This is necessary for non-interactive CI.
echo 'y' | ./download --exclude c-api
# Move files to the correct location
mv voicevox_core crates/tauri_app/
- name: setup db
run: |
mkdir data
touch data/db.sqlite
deno task migrate
- name: Build with Tauri
uses: tauri-apps/tauri-action@v0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# Disables update check for tauri-cli
TAURI_CLI_NO_UPDATE_NOTIFIER: 1
with:
tagName: ${{ github.ref_name }}
releaseName: "v__VERSION__"
releaseBody: "See the assets to download this version and install."
releaseDraft: true
prerelease: false
projectPath: "crates/tauri_app"