Files
clawpanel/.github/workflows/ci.yml
晴天 e62f270422 chore: 跨平台构建脚本 + CI/CD 改进 + 行尾规范
- 新增 .gitattributes 统一 LF 行尾,解决 Mac/Windows 协作 CRLF 问题
- 新增 build.ps1 Windows 本地构建脚本(支持 -Debug/-Clean 参数)
- 新增 build.sh macOS/Linux 本地构建脚本
- 新增 .windsurf/workflows/release.md 发版操作工作流
- release.yml: 将 Release Notes 更新抽为独立 job,彻底解决多 matrix job 竞争条件
- release.yml: 补充代码签名环境变量注释占位,开源后可直接配 Secrets 启用
- ci.yml: 增加 cargo fmt --check 和 cargo clippy -D warnings 质量门禁
- .gitignore: 补充 Windows 平台特有文件、内部报告、IDE 文件
- docs/index.html: 修正 openclaw 仓库 URL
- README.md: 修正 openclaw 仓库 URL
2026-03-04 12:17:48 +08:00

91 lines
2.2 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 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: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install -y \
libwebkit2gtk-4.1-dev \
librsvg2-dev \
patchelf \
libssl-dev \
libgtk-3-dev \
libayatana-appindicator3-dev
# Rust 格式检查
- name: Rust 格式检查
working-directory: src-tauri
run: cargo fmt --all -- --check
# Rust 编译检查
- name: Rust 编译检查
working-directory: src-tauri
run: cargo check
# Rust Lint警告视为错误
- name: Rust Clippy
working-directory: src-tauri
run: cargo clippy --all-targets -- -D warnings
# 前端构建验证
- name: 前端构建验证
run: npm run build