docs: add project README and initialize repository
This commit is contained in:
@@ -0,0 +1,48 @@
|
||||
version: 43
|
||||
jobs:
|
||||
- name: 构建部署 PortFlow
|
||||
steps:
|
||||
# ========== 步骤1:拉取代码 ==========
|
||||
- type: CheckoutStep
|
||||
name: 拉取最新代码
|
||||
cloneCredential:
|
||||
type: DefaultCredential
|
||||
withLfs: false
|
||||
withSubmodules: false
|
||||
checkoutPath: '@project_path@'
|
||||
condition: SUCCESSFUL
|
||||
optional: false
|
||||
|
||||
# ========== 步骤2:执行 Tauri 编译打包 ==========
|
||||
- type: CommandStep
|
||||
name: 安装前端依赖并离线打包exe
|
||||
# 💡 使用集成了 Rust 1.80+ 稳定版和 Node 环境的公共基础镜像
|
||||
image: rust:1.80-slim
|
||||
commands:
|
||||
# 1. 安装构建所需的依赖环境 (C++ 编译器、Node 环境等)
|
||||
- apt-get update && apt-get install -y curl libwebkit2gtk-4.1-dev build-essential libssl-dev libgtk-3-dev libayumu-dev libsoup-3.0-dev
|
||||
- curl -fsSL https://bun.sh/install | bash
|
||||
- export PATH="$HOME/.bun/bin:$PATH"
|
||||
|
||||
# 2. 切换到项目根目录安装前端并编译
|
||||
- cd @project_path@
|
||||
- bun install
|
||||
|
||||
# 3. 强行执行离线打包,直接吐出绿色 exe
|
||||
- bun tauri build -- --offline
|
||||
condition: SUCCESSFUL
|
||||
optional: false
|
||||
|
||||
# ========== 任务级别配置 ==========
|
||||
jobExecutor: docker
|
||||
# 💡 关键配置:告诉 OneDev 将打包出来的 exe 作为流水线成果留存
|
||||
artifacts: src-tauri/target/release/PortFlow.exe
|
||||
triggers:
|
||||
- type: BranchUpdateTrigger
|
||||
branches: main
|
||||
userMatch: anyone
|
||||
projects: PortFlow # 💡 别忘了同步你在 OneDev 里的最新项目名
|
||||
retryCondition: never
|
||||
maxRetries: 3
|
||||
retryDelay: 30
|
||||
timeout: 3600 # 缩短超时时间到 1 小时
|
||||
Reference in New Issue
Block a user