Skip to content

ci: enable auto-generated release notes in publish workflow #28

ci: enable auto-generated release notes in publish workflow

ci: enable auto-generated release notes in publish workflow #28

Workflow file for this run

name: "Tauri Cross-Platform Build Check"
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
workflow_dispatch:
jobs:
build:
name: Build on ${{ matrix.platform.name }}
runs-on: ${{ matrix.platform.runner }}
strategy:
fail-fast: false
matrix:
platform:
- name: Linux
runner: ubuntu-latest
target: x86_64-unknown-linux-gnu
- name: Windows (MSVC)
runner: windows-latest
target: x86_64-pc-windows-msvc
steps:
- name: Checkout source
uses: actions/checkout@v4
- name: Install Linux dependencies
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install -y libglib2.0-dev pkg-config libgtk-3-dev javascriptcoregtk-4.1 libsoup-3.0 webkit2gtk-4.1
# ---------- Bun 安装 ----------
- name: Setup Bun
uses: oven-sh/setup-bun@v1
with:
bun-version: latest
# ---------- 缓存 Bun ----------
- name: Cache Bun packages
uses: actions/cache@v4
with:
path: ~/.bun/install/cache
key: ${{ runner.os }}-bun-${{ hashFiles('**/bun.lock') }}
restore-keys: |
${{ runner.os }}-bun-
# ---------- 安装 Rust ----------
- name: Setup Rust
uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.platform.target }}
# ---------- 缓存 Rust ----------
- name: Cache Rust build
uses: actions/cache@v4
with:
path: |
target
~/.cargo/registry
~/.cargo/git
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-
# ---------- 安装依赖 ----------
- name: Install dependencies
run: |
bun install
# ---------- Type check ----------
- name: Type check
run: |
bun run tsc --noEmit
# ---------- Lint ----------
- name: Lint
run: |
bun run lint
# ---------- 构建 tauri ----------
- name: Build Tauri app
run: |
bun run tauri build --target ${{ matrix.platform.target }}