Skip to content

chore(studio): bump 0.3.1 #22

chore(studio): bump 0.3.1

chore(studio): bump 0.3.1 #22

Workflow file for this run

name: Release
# Triggered by a version tag (v*) or manually.
# Creates a draft GitHub release with Linux (.deb, .AppImage) and Windows (.msi, .exe) bundles.
on:
push:
tags: ['v*']
workflow_dispatch:
jobs:
build-studio:
permissions:
contents: write
strategy:
fail-fast: false
matrix:
include:
- platform: ubuntu-22.04
- platform: windows-latest
runs-on: ${{ matrix.platform }}
steps:
- uses: actions/checkout@v4
# ── Toolchains ────────────────────────────────────────────────────────
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20
- name: Install Rust stable
uses: dtolnay/rust-toolchain@stable
- name: Cache Cargo registry
uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
omniphony-renderer/target
omniphony-studio/src-tauri/target
key: ${{ runner.os }}-cargo-${{ hashFiles('omniphony-renderer/Cargo.lock', 'omniphony-studio/src-tauri/Cargo.lock') }}
restore-keys: ${{ runner.os }}-cargo-
# ── Platform dependencies ─────────────────────────────────────────────
- name: Install Linux system dependencies
if: runner.os == 'Linux'
run: |
# PPA required: ubuntu-22.04 ships PipeWire 0.3.48 but pipewire-rs 0.9.x
# needs >= 0.3.65. PipeWire 1.0.x (ubuntu-24.04) removed some constants
# the crate relies on. This PPA provides a compatible 0.3.85+ build.
for attempt in 1 2 3; do
if sudo add-apt-repository ppa:pipewire-debian/pipewire-upstream -y; then
break
fi
if [ "$attempt" -eq 3 ]; then
echo "Failed to add PipeWire PPA after $attempt attempts" >&2
exit 1
fi
sleep 10
done
for attempt in 1 2 3; do
if sudo apt-get update; then
break
fi
if [ "$attempt" -eq 3 ]; then
echo "apt-get update failed after $attempt attempts" >&2
exit 1
fi
sleep 10
done
sudo apt-get install -y \
libwebkit2gtk-4.1-dev \
libssl-dev \
libgtk-3-dev \
libayatana-appindicator3-dev \
librsvg2-dev \
libpipewire-0.3-dev \
pkg-config
# The ASIO SDK (Steinberg) is required to compile cpal with ASIO support on Windows.
# Store in repository secrets:
# ASIO_SDK_URL — full GitHub release download URL:
# https://github.com/<owner>/<repo>/releases/download/<tag>/<file>.zip
# ASIO_SDK_TOKEN — PAT with Contents:Read on the repo hosting the SDK
- name: Setup ASIO SDK (Windows)
if: runner.os == 'Windows'
shell: bash
env:
GH_TOKEN: ${{ secrets.ASIO_SDK_TOKEN }}
ASIO_SDK_URL: ${{ secrets.ASIO_SDK_URL }}
run: |
# Parse repo (owner/name), tag, and filename from the release URL.
REPO=$(echo "$ASIO_SDK_URL" | sed 's|https://github.com/\([^/]*/[^/]*\)/.*|\1|')
TAG=$(echo "$ASIO_SDK_URL" | sed 's|.*/releases/download/\([^/]*\)/.*|\1|')
FILENAME=$(basename "$ASIO_SDK_URL")
echo "Downloading $FILENAME from $REPO @ $TAG"
gh release download "$TAG" --repo "$REPO" --pattern "$FILENAME" --dir "$RUNNER_TEMP"
7z x "$RUNNER_TEMP/$FILENAME" -o"$RUNNER_TEMP/asio_sdk"
ls "$RUNNER_TEMP/asio_sdk/"
SDK_DIR=$(ls -d "$RUNNER_TEMP/asio_sdk/"*/ | head -1)
echo "CPAL_ASIO_DIR=$SDK_DIR" >> "$GITHUB_ENV"
# ── Build ─────────────────────────────────────────────────────────────
- name: Install npm dependencies
working-directory: omniphony-studio
run: npm install
# tauri-action runs tauri.conf.json's beforeBuildCommand automatically:
# "npm run build && npm run prepare-sidecar"
# prepare-sidecar compiles orender (cargo build --release) and copies
# the binary into src-tauri/binaries/ before Tauri packages the app.
- name: Build and publish
uses: tauri-apps/tauri-action@v0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
projectPath: omniphony-studio
tagName: ${{ github.ref_name }}
releaseName: 'Omniphony ${{ github.ref_name }}'
releaseDraft: true
prerelease: false