mirror of
https://github.com/qingchencloud/clawpanel.git
synced 2026-05-11 01:50:00 +08:00
- 添加 README、LICENSE (MIT)、CONTRIBUTING、CHANGELOG - 添加 GitHub Issue/PR 模板和 FUNDING 配置 - 添加 CI/CD 工作流(ci.yml + release.yml) - 添加项目文档页面 (docs/index.html) - 添加 logo 和社群二维码图片资源 - 添加开发和构建脚本 (dev.sh + build.sh) - 更新 package-lock.json 依赖
82 lines
2.0 KiB
YAML
82 lines
2.0 KiB
YAML
# ClawPanel 持续集成工作流
|
|
# 在推送到 main 分支或提交 PR 到 main 分支时自动运行
|
|
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
pull_request:
|
|
branches: [main]
|
|
|
|
# 同一分支的新提交会取消正在运行的旧工作流
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
check:
|
|
name: 检查 (${{ matrix.platform.name }})
|
|
runs-on: ${{ matrix.platform.os }}
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
platform:
|
|
# macOS Apple Silicon
|
|
- name: macOS (ARM64)
|
|
os: macos-latest
|
|
# Linux x86_64
|
|
- name: Linux (x64)
|
|
os: ubuntu-latest
|
|
# Windows x86_64
|
|
- name: Windows (x64)
|
|
os: windows-latest
|
|
|
|
steps:
|
|
# 签出代码
|
|
- name: 签出代码
|
|
uses: actions/checkout@v4
|
|
|
|
# 安装 Node.js 22
|
|
- name: 安装 Node.js
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: 22
|
|
cache: npm
|
|
|
|
# 安装前端依赖
|
|
- name: 安装前端依赖
|
|
run: npm ci
|
|
|
|
# 安装 Rust 工具链 (stable)
|
|
- name: 安装 Rust 工具链
|
|
uses: dtolnay/rust-toolchain@stable
|
|
|
|
# Rust 编译缓存
|
|
- name: Rust 编译缓存
|
|
uses: swatinem/rust-cache@v2
|
|
with:
|
|
workspaces: src-tauri -> target
|
|
|
|
# Linux 专用: 安装 Tauri v2 系统依赖
|
|
- name: 安装 Linux 系统依赖
|
|
if: matrix.platform.os == 'ubuntu-latest'
|
|
run: |
|
|
sudo apt-get update
|
|
sudo apt-get install -y \
|
|
libwebkit2gtk-4.1-dev \
|
|
libappindicator3-dev \
|
|
librsvg2-dev \
|
|
patchelf \
|
|
libssl-dev \
|
|
libgtk-3-dev \
|
|
libayatana-appindicator3-dev
|
|
|
|
# Rust 编译检查
|
|
- name: Rust 编译检查
|
|
working-directory: src-tauri
|
|
run: cargo check
|
|
|
|
# 前端构建验证
|
|
- name: 前端构建验证
|
|
run: npm run build
|