Skip to content

Commit 248af75

Browse files
authored
feat(deploy): Git版本迭代管理工作流 + CI/CD + CHANGELOG (#3)
建立完整的Git版本迭代管理流程 - docs/git-iteration-workflow.md: 10大模块完整工作流 - .github/workflows/ci.yml: PR CI检查 - .github/workflows/release.yml: GitHub Release自动创建 - .github/workflows/cleanup.yml: 分支自动清理 - CHANGELOG.md: 项目变更日志v0.1.0-v0.6.0
1 parent 527cdcd commit 248af75

5 files changed

Lines changed: 754 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: CI
2+
3+
on:
4+
pull_request:
5+
branches: [main]
6+
7+
jobs:
8+
lint:
9+
name: lint
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v4
13+
- uses: actions/setup-node@v4
14+
with:
15+
node-version: 20
16+
cache: 'npm'
17+
- run: npm ci
18+
- run: npx prisma generate
19+
- run: npm run lint
20+
21+
type-check:
22+
name: type-check
23+
runs-on: ubuntu-latest
24+
steps:
25+
- uses: actions/checkout@v4
26+
- uses: actions/setup-node@v4
27+
with:
28+
node-version: 20
29+
cache: 'npm'
30+
- run: npm ci
31+
- run: npx prisma generate
32+
- run: npx tsc --noEmit
33+
34+
build:
35+
name: build
36+
runs-on: ubuntu-latest
37+
needs: [lint, type-check]
38+
steps:
39+
- uses: actions/checkout@v4
40+
- uses: actions/setup-node@v4
41+
with:
42+
node-version: 20
43+
cache: 'npm'
44+
- run: npm ci
45+
- run: npx prisma generate
46+
- run: npm run build
47+
env:
48+
DATABASE_URL: "file:/tmp/test.db"
49+
NEXTAUTH_SECRET: "ci-test-secret"
50+
AUTH_TRUST_HOST: "true"

.github/workflows/cleanup.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Cleanup Branch
2+
3+
on:
4+
pull_request:
5+
types: [closed]
6+
7+
jobs:
8+
cleanup:
9+
runs-on: ubuntu-latest
10+
if: github.event.pull_request.merged == true
11+
steps:
12+
- name: Delete merged branch
13+
run: |
14+
BRANCH_NAME="${{ github.event.pull_request.head.ref }}"
15+
# Don't delete main, release, or hotfix branches
16+
if [[ "$BRANCH_NAME" == main ]] || [[ "$BRANCH_NAME" == release/* ]] || [[ "$BRANCH_NAME" == hotfix/* ]]; then
17+
echo "Skipping deletion of protected branch: $BRANCH_NAME"
18+
exit 0
19+
fi
20+
21+
echo "Deleting remote branch: $BRANCH_NAME"
22+
curl -X DELETE \
23+
-H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
24+
-H "Accept: application/vnd.github+json" \
25+
"https://api.github.com/repos/${{ github.repository }}/git/refs/heads/${BRANCH_NAME}"

.github/workflows/release.yml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*'
7+
8+
permissions:
9+
contents: write
10+
11+
jobs:
12+
release:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v4
16+
with:
17+
fetch-depth: 0
18+
19+
- name: Get version from tag
20+
id: version
21+
run: echo "VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
22+
23+
- name: Generate changelog
24+
id: changelog
25+
run: |
26+
# Get the previous tag
27+
PREV_TAG=$(git tag --sort=-creatordate | sed -n '2p')
28+
if [ -z "$PREV_TAG" ]; then
29+
PREV_TAG=$(git rev-list --max-parents=0 HEAD)
30+
fi
31+
32+
# Generate changelog from commits
33+
echo "CHANGELOG<<EOF" >> $GITHUB_OUTPUT
34+
git log ${PREV_TAG}..${{ steps.version.outputs.VERSION }} --pretty=format:"- %s (%h)" >> $GITHUB_OUTPUT
35+
echo "" >> $GITHUB_OUTPUT
36+
echo "EOF" >> $GITHUB_OUTPUT
37+
38+
- name: Create GitHub Release
39+
uses: actions/create-release@v1
40+
env:
41+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
42+
with:
43+
tag_name: ${{ steps.version.outputs.VERSION }}
44+
release_name: Release ${{ steps.version.outputs.VERSION }}
45+
body: |
46+
## 🎬 AI短剧创作平台 ${{ steps.version.outputs.VERSION }}
47+
48+
### 变更内容
49+
${{ steps.changelog.outputs.CHANGELOG }}
50+
51+
---
52+
**部署地址**: https://huobao-drama-ai.vercel.app
53+
draft: false
54+
prerelease: ${{ contains(steps.version.outputs.VERSION, '-') }}

CHANGELOG.md

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
# Changelog
2+
3+
All notable changes to this project will be documented in this file.
4+
5+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7+
8+
## [Unreleased]
9+
10+
## [0.6.0] - 2026-05-19
11+
12+
### Added
13+
- 集级AI配置锁定(LockedConfig)— 统一剧集的AI模型和参数风格
14+
- 宫格图UI集成到分镜面板 — Grid3X3按钮 + 配置弹窗 + 进度追踪
15+
- 服务端FFmpeg合成UI — 合成模式自动检测 + 合并按钮 + 结果展示
16+
- 分镜参考图/首尾帧UI增强 — 多图上传/删除 + 3列网格布局
17+
- Pipeline步骤视图差异化 — 每个步骤展示独特内容
18+
19+
### Changed
20+
- episode-workspace 新增锁定状态、宫格图、FFmpeg合成等交互
21+
- storyboard-panel 支持参考图上传和显示
22+
- production-panel 支持 FFmpeg 服务端合成模式
23+
24+
## [0.5.0] - 2026-05-18
25+
26+
### Added
27+
- 服务端FFmpeg视频合成系统(H.264/MP4/SRT字幕烧录)
28+
- 宫格图生成与切分系统(3种模式: first_frame/first_last/multi_ref)
29+
- 11步制作流水线导航(侧栏状态 + 底部导航 + 进度指示)
30+
- 分镜编辑界面增强(4区域17字段精细编辑)
31+
- 角色音色试听与手动分配(5家供应商34+音色)
32+
- VideoGeneration / VideoMerge 数据模型
33+
- /api/ai/grid/* 宫格图API套件(generate/split/status)
34+
- /api/ai/voices + /api/ai/voice-sample 音色API
35+
- /api/episodes/[id]/merge 视频合并API
36+
- /src/lib/ffmpeg.ts FFmpeg工具模块
37+
- /src/lib/grid.ts 宫格图工具模块
38+
39+
### Changed
40+
- pipeline-status API 升级为11步详细格式
41+
- compose API 支持双模式(服务端FFmpeg + 客户端回退)
42+
43+
## [0.4.0] - 2026-05-15
44+
45+
### Added
46+
- NextAuth 完整用户认证体系
47+
- free/pro/admin 角色权限系统
48+
- 免费用户自配API Key功能
49+
- 用户供应商管理API (/api/settings/user-provider)
50+
- OpenRouter LLM供应商支持
51+
52+
### Fixed
53+
- 修复免费用户API Key配置的多个Bug
54+
- 修复模型配置页面白屏问题
55+
- 修复X-Title header中文导致ByteString错误
56+
57+
## [0.3.0] - 2026-05-12
58+
59+
### Added
60+
- 多模态AI创作:图片生成、视频生成、TTS配音
61+
- 多AI供应商统一接口(15+预设)
62+
- 可视化模型选择器(网格式 + 标签筛选)
63+
- 连接测试功能
64+
- SSE流式Agent执行
65+
66+
## [0.2.0] - 2026-05-08
67+
68+
### Added
69+
- AI剧本改写(SSE流式输出)
70+
- 角色与场景自动提取
71+
- 智能分镜生成
72+
- 多供应商AI配置(LLM/Image/Video/TTS)
73+
74+
## [0.1.0] - 2026-05-05
75+
76+
### Added
77+
- Next.js 16 项目框架搭建
78+
- Prisma ORM + SQLite 数据库
79+
- 基础UI组件(shadcn/ui)
80+
- 项目/剧集/分镜CRUD API
81+
- Vercel Serverless 部署

0 commit comments

Comments
 (0)