impress_asr_input_rust/.github/workflows/release-all.yml
impressionyang ceb2df18c4
Some checks are pending
Build Windows GUI / build-windows (push) Waiting to run
Build Windows GUI / release (push) Blocked by required conditions
初始提交:Windows 跨平台语音识别应用
功能:
- Tauri v2 GUI 应用
- 系统托盘支持
- 日志输出到文件
- 带时间戳的版本号
- 前端资源嵌入

修复:
- 前端路径使用相对路径
- 移除 devUrl 配置
- 窗口置顶设置
2026-05-21 17:58:18 +08:00

183 lines
4.4 KiB
YAML

name: Build All Platforms
on:
push:
tags: ['v*']
workflow_dispatch:
env:
CARGO_TERM_COLOR: always
jobs:
# Windows GUI Build
build-windows:
runs-on: windows-latest
timeout-minutes: 60
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Rust
uses: dtolnay/rust-action@stable
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
cache-dependency-path: web/package-lock.json
- name: Install frontend dependencies
run: cd web && npm ci
- name: Build frontend
run: cd web && npm run build
- name: Build GUI
run: cargo build --release --features gui
- name: Create package
run: |
mkdir dist
cp target/release/impress_asr_gui.exe dist/
cp target/release/impress_asr.exe dist/
cp README.md dist/
cp LICENSE dist/
mkdir dist/models
echo "Download models from: https://huggingface.co/FunAudioLLM/SenseVoiceSmall" > dist/models/README.txt
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: impress-asr-windows-x64
path: dist/
# Linux GUI Build (requires system dependencies)
build-linux:
runs-on: ubuntu-22.04
timeout-minutes: 60
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install -y \
libgtk-3-dev \
libwebkit2gtk-4.1-dev \
libappindicator3-dev \
librsvg2-dev \
libssl-dev
- name: Install Rust
uses: dtolnay/rust-action@stable
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
cache-dependency-path: web/package-lock.json
- name: Install frontend dependencies
run: cd web && npm ci
- name: Build frontend
run: cd web && npm run build
- name: Build GUI
run: cargo build --release --features gui
- name: Create AppImage (optional)
run: |
# AppImage build requires additional setup
echo "AppImage build skipped - configure with tauri-apps/tauri-action"
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: impress-asr-linux-x64
path: target/release/impress_asr_gui
# macOS GUI Build
build-macos:
runs-on: macos-latest
timeout-minutes: 60
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Rust
uses: dtolnay/rust-action@stable
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
cache-dependency-path: web/package-lock.json
- name: Install frontend dependencies
run: cd web && npm ci
- name: Build frontend
run: cd web && npm run build
- name: Build GUI
run: cargo build --release --features gui
- name: Create DMG (optional)
run: |
echo "DMG build skipped - configure with tauri-apps/tauri-action"
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: impress-asr-macos-x64
path: target/release/impress_asr_gui
# Create Release (only when tagged)
create-release:
needs: [build-windows, build-linux, build-macos]
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/')
permissions:
contents: write
steps:
- name: Download Windows artifact
uses: actions/download-artifact@v4
with:
name: impress-asr-windows-x64
path: ./release/windows
- name: Download Linux artifact
uses: actions/download-artifact@v4
with:
name: impress-asr-linux-x64
path: ./release/linux
- name: Download macOS artifact
uses: actions/download-artifact@v4
with:
name: impress-asr-macos-x64
path: ./release/macos
- name: Create ZIP archives
run: |
cd release
zip -r impress-asr-${{ github.ref_name }}-windows-x64.zip windows/
zip -r impress-asr-${{ github.ref_name }}-linux-x64.zip linux/
zip -r impress-asr-${{ github.ref_name }}-macos-x64.zip macos/
- name: Create GitHub Release
uses: softprops/action-gh-release@v1
with:
files: release/*.zip
generate_release_notes: true
draft: true