* refactor(engine): 重构2D渲染管线坐标系统 * feat(engine): 完善2D渲染管线和编辑器视口功能 * feat(editor): 实现Viewport变换工具系统 * feat(editor): 优化Inspector渲染性能并修复Gizmo变换工具显示 * feat(editor): 实现Run on Device移动预览功能 * feat(editor): 添加组件属性控制和依赖关系系统 * feat(editor): 实现动画预览功能和优化SpriteAnimator编辑器 * feat(editor): 修复SpriteAnimator动画预览功能并迁移CI到pnpm * feat(editor): 修复SpriteAnimator动画预览并迁移到pnpm * feat(editor): 修复SpriteAnimator动画预览并迁移到pnpm * feat(editor): 修复SpriteAnimator动画预览并迁移到pnpm * feat(editor): 修复SpriteAnimator动画预览并迁移到pnpm * feat(ci): 迁移项目到pnpm并修复CI构建问题 * chore: 迁移CI工作流到pnpm并添加WASM构建支持 * chore: 迁移CI工作流到pnpm并添加WASM构建支持 * chore: 迁移CI工作流到pnpm并添加WASM构建支持 * chore: 迁移CI工作流到pnpm并添加WASM构建支持 * chore: 迁移CI工作流到pnpm并添加WASM构建支持 * chore: 迁移CI工作流到pnpm并添加WASM构建支持 * chore: 移除 network 相关包 * chore: 移除 network 相关包
175 lines
5.4 KiB
YAML
175 lines
5.4 KiB
YAML
name: Release Editor App
|
|
|
|
on:
|
|
push:
|
|
tags:
|
|
- 'editor-v*'
|
|
workflow_dispatch:
|
|
inputs:
|
|
version:
|
|
description: 'Release version (e.g., 1.0.0)'
|
|
required: true
|
|
default: '1.0.0'
|
|
|
|
jobs:
|
|
build-tauri:
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
include:
|
|
- platform: windows-latest
|
|
target: x86_64-pc-windows-msvc
|
|
arch: x64
|
|
- platform: macos-latest
|
|
target: x86_64-apple-darwin
|
|
arch: x64
|
|
- platform: macos-latest
|
|
target: aarch64-apple-darwin
|
|
arch: arm64
|
|
|
|
runs-on: ${{ matrix.platform }}
|
|
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Install pnpm
|
|
uses: pnpm/action-setup@v2
|
|
with:
|
|
version: 8
|
|
|
|
- name: Setup Node.js
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: '20.x'
|
|
cache: 'pnpm'
|
|
|
|
- name: Install Rust stable
|
|
uses: dtolnay/rust-toolchain@stable
|
|
with:
|
|
targets: ${{ matrix.target }}
|
|
|
|
- name: Rust cache
|
|
uses: Swatinem/rust-cache@v2
|
|
with:
|
|
workspaces: packages/editor-app/src-tauri
|
|
cache-on-failure: true
|
|
|
|
- name: Install dependencies (Ubuntu)
|
|
if: matrix.platform == 'ubuntu-latest'
|
|
run: |
|
|
sudo apt-get update
|
|
sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.0-dev libappindicator3-dev librsvg2-dev patchelf
|
|
|
|
- name: Install frontend dependencies
|
|
run: pnpm install
|
|
|
|
- name: Update version in config files (for manual trigger)
|
|
if: github.event_name == 'workflow_dispatch'
|
|
run: |
|
|
cd packages/editor-app
|
|
npm version ${{ github.event.inputs.version }} --no-git-tag-version
|
|
node scripts/sync-version.js
|
|
|
|
- name: Cache TypeScript build
|
|
uses: actions/cache@v4
|
|
with:
|
|
path: |
|
|
packages/core/bin
|
|
packages/editor-core/dist
|
|
packages/behavior-tree/bin
|
|
key: ${{ runner.os }}-ts-build-${{ hashFiles('packages/core/src/**', 'packages/editor-core/src/**', 'packages/behavior-tree/src/**') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-ts-build-
|
|
|
|
- name: Build core package
|
|
run: pnpm run build:core
|
|
|
|
- name: Build editor-core package
|
|
run: |
|
|
cd packages/editor-core
|
|
pnpm run build
|
|
|
|
- name: Build behavior-tree package
|
|
run: |
|
|
cd packages/behavior-tree
|
|
pnpm run build
|
|
|
|
- name: Install wasm-pack
|
|
run: cargo install wasm-pack
|
|
|
|
- name: Build engine package (Rust WASM)
|
|
run: |
|
|
cd packages/engine
|
|
pnpm run build
|
|
|
|
- name: Build ecs-engine-bindgen package
|
|
run: |
|
|
cd packages/ecs-engine-bindgen
|
|
pnpm run build
|
|
|
|
- name: Build Tauri app
|
|
uses: tauri-apps/tauri-action@v0.5
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY }}
|
|
TAURI_SIGNING_PRIVATE_KEY_PASSWORD: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY_PASSWORD }}
|
|
with:
|
|
projectPath: packages/editor-app
|
|
tagName: ${{ github.event_name == 'workflow_dispatch' && format('editor-v{0}', github.event.inputs.version) || github.ref_name }}
|
|
releaseName: 'ECS Editor v${{ github.event.inputs.version || github.ref_name }}'
|
|
releaseBody: 'See the assets to download this version and install.'
|
|
releaseDraft: false
|
|
prerelease: false
|
|
includeUpdaterJson: true
|
|
updaterJsonKeepUniversal: false
|
|
args: ${{ matrix.platform == 'macos-latest' && format('--target {0}', matrix.target) || '' }}
|
|
|
|
# 构建成功后,创建 PR 更新版本号
|
|
update-version-pr:
|
|
needs: build-tauri
|
|
if: github.event_name == 'workflow_dispatch' && success()
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Setup Node.js
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: '20.x'
|
|
|
|
- name: Update version files
|
|
run: |
|
|
cd packages/editor-app
|
|
npm version ${{ github.event.inputs.version }} --no-git-tag-version
|
|
node scripts/sync-version.js
|
|
|
|
- name: Create Pull Request
|
|
uses: peter-evans/create-pull-request@v6
|
|
with:
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|
|
commit-message: "chore(editor): bump version to ${{ github.event.inputs.version }}"
|
|
branch: release/editor-v${{ github.event.inputs.version }}
|
|
delete-branch: true
|
|
title: "chore(editor): Release v${{ github.event.inputs.version }}"
|
|
body: |
|
|
## 🚀 Release v${{ github.event.inputs.version }}
|
|
|
|
This PR updates the editor version after successful release build.
|
|
|
|
### Changes
|
|
- ✅ Updated `packages/editor-app/package.json` → `${{ github.event.inputs.version }}`
|
|
- ✅ Updated `packages/editor-app/src-tauri/tauri.conf.json` → `${{ github.event.inputs.version }}`
|
|
|
|
### Release
|
|
- 📦 [GitHub Release](https://github.com/${{ github.repository }}/releases/tag/editor-v${{ github.event.inputs.version }})
|
|
|
|
---
|
|
*This PR was automatically created by the release workflow.*
|
|
labels: |
|
|
release
|
|
editor
|
|
automated pr
|