qe-github-release-management
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseGitHub Release Management Skill
GitHub 发布管理技能
Intelligent release automation and orchestration using AI swarms for comprehensive software releases - from changelog generation to multi-platform deployment with rollback capabilities.
使用AI swarms实现智能发布自动化与编排,覆盖软件发布全流程:从变更日志生成到多平台部署,支持回滚能力。
Quick Start
快速开始
Simple Release Flow
简单发布流程
bash
undefinedbash
undefinedPlan and create a release
规划并创建发布
gh release create v2.0.0
--draft
--generate-notes
--title "Release v2.0.0"
--draft
--generate-notes
--title "Release v2.0.0"
gh release create v2.0.0
--draft
--generate-notes
--title "Release v2.0.0"
--draft
--generate-notes
--title "Release v2.0.0"
Orchestrate with swarm
使用swarm编排
npx claude-flow github release-create
--version "2.0.0"
--build-artifacts
--deploy-targets "npm,docker,github"
--version "2.0.0"
--build-artifacts
--deploy-targets "npm,docker,github"
undefinednpx claude-flow github release-create
--version "2.0.0"
--build-artifacts
--deploy-targets "npm,docker,github"
--version "2.0.0"
--build-artifacts
--deploy-targets "npm,docker,github"
undefinedFull Automated Release
全自动化发布
bash
undefinedbash
undefinedInitialize release swarm
初始化发布swarm
npx claude-flow swarm init --topology hierarchical
npx claude-flow swarm init --topology hierarchical
Execute complete release pipeline
执行完整发布流水线
npx claude-flow sparc pipeline "Release v2.0.0 with full validation"
---npx claude-flow sparc pipeline "Release v2.0.0 with full validation"
---Core Capabilities
核心能力
1. Release Planning & Version Management
1. 发布规划与版本管理
- Semantic version analysis and suggestion
- Breaking change detection from commits
- Release timeline generation
- Multi-package version coordination
- 语义化版本分析与建议
- 从提交记录中检测破坏性变更
- 发布时间线生成
- 多包版本协调
2. Automated Testing & Validation
2. 自动化测试与验证
- Multi-stage test orchestration
- Cross-platform compatibility testing
- Performance regression detection
- Security vulnerability scanning
- 多阶段测试编排
- 跨平台兼容性测试
- 性能回归检测
- 安全漏洞扫描
3. Build & Deployment Orchestration
3. 构建与部署编排
- Multi-platform build coordination
- Parallel artifact generation
- Progressive deployment strategies
- Automated rollback mechanisms
- 多平台构建协调
- 并行产物生成
- 渐进式部署策略
- 自动化回滚机制
4. Documentation & Communication
4. 文档与沟通
- Automated changelog generation
- Release notes with categorization
- Migration guide creation
- Stakeholder notification
- 自动化变更日志生成
- 带分类的发布说明
- 迁移指南创建
- 涉众通知
Progressive Disclosure: Level 1 - Basic Usage
渐进式披露:1级 - 基础用法
Essential Release Commands
核心发布命令
Create Release Draft
创建发布草稿
bash
undefinedbash
undefinedGet last release tag
获取最近的发布标签
LAST_TAG=$(gh release list --limit 1 --json tagName -q '.[0].tagName')
LAST_TAG=$(gh release list --limit 1 --json tagName -q '.[0].tagName')
Generate changelog from commits
从提交记录生成变更日志
CHANGELOG=$(gh api repos/:owner/:repo/compare/${LAST_TAG}...HEAD
--jq '.commits[].commit.message')
--jq '.commits[].commit.message')
CHANGELOG=$(gh api repos/:owner/:repo/compare/${LAST_TAG}...HEAD
--jq '.commits[].commit.message')
--jq '.commits[].commit.message')
Create draft release
创建草稿发布
gh release create v2.0.0
--draft
--title "Release v2.0.0"
--notes "$CHANGELOG"
--target main
--draft
--title "Release v2.0.0"
--notes "$CHANGELOG"
--target main
undefinedgh release create v2.0.0
--draft
--title "Release v2.0.0"
--notes "$CHANGELOG"
--target main
--draft
--title "Release v2.0.0"
--notes "$CHANGELOG"
--target main
undefinedBasic Version Bump
基础版本升级
bash
undefinedbash
undefinedUpdate package.json version
更新package.json版本
npm version patch # or minor, major
npm version patch # 或者 minor, major
Push version tag
推送版本标签
git push --follow-tags
undefinedgit push --follow-tags
undefinedSimple Deployment
简单部署
bash
undefinedbash
undefinedBuild and publish npm package
构建并发布npm包
npm run build
npm publish
npm run build
npm publish
Create GitHub release
创建GitHub发布
gh release create $(npm pkg get version)
--generate-notes
--generate-notes
undefinedgh release create $(npm pkg get version)
--generate-notes
--generate-notes
undefinedQuick Integration Example
快速集成示例
javascript
// Simple release preparation in Claude Code
[Single Message]:
// Update version files
Edit("package.json", { old: '"version": "1.0.0"', new: '"version": "2.0.0"' })
// Generate changelog
Bash("gh api repos/:owner/:repo/compare/v1.0.0...HEAD --jq '.commits[].commit.message' > CHANGELOG.md")
// Create release branch
Bash("git checkout -b release/v2.0.0")
Bash("git add -A && git commit -m 'release: Prepare v2.0.0'")
// Create PR
Bash("gh pr create --title 'Release v2.0.0' --body 'Automated release preparation'")javascript
// Claude Code中简单的发布准备
[Single Message]:
// 更新版本文件
Edit("package.json", { old: '"version": "1.0.0"', new: '"version": "2.0.0"' })
// 生成变更日志
Bash("gh api repos/:owner/:repo/compare/v1.0.0...HEAD --jq '.commits[].commit.message' > CHANGELOG.md")
// 创建发布分支
Bash("git checkout -b release/v2.0.0")
Bash("git add -A && git commit -m 'release: Prepare v2.0.0'")
// 创建PR
Bash("gh pr create --title 'Release v2.0.0' --body 'Automated release preparation'")Progressive Disclosure: Level 2 - Swarm Coordination
渐进式披露:2级 - Swarm协调
AI Swarm Release Orchestration
AI Swarm发布编排
Initialize Release Swarm
初始化发布Swarm
javascript
// Set up coordinated release team
[Single Message - Swarm Initialization]:
mcp__claude-flow__swarm_init {
topology: "hierarchical",
maxAgents: 6,
strategy: "balanced"
}
// Spawn specialized agents
mcp__claude-flow__agent_spawn { type: "coordinator", name: "Release Director" }
mcp__claude-flow__agent_spawn { type: "coder", name: "Version Manager" }
mcp__claude-flow__agent_spawn { type: "tester", name: "QA Engineer" }
mcp__claude-flow__agent_spawn { type: "reviewer", name: "Release Reviewer" }
mcp__claude-flow__agent_spawn { type: "analyst", name: "Deployment Analyst" }
mcp__claude-flow__agent_spawn { type: "researcher", name: "Compatibility Checker" }javascript
// 设置协同发布团队
[Single Message - Swarm Initialization]:
mcp__claude-flow__swarm_init {
topology: "hierarchical",
maxAgents: 6,
strategy: "balanced"
}
// 生成专用Agent
mcp__claude-flow__agent_spawn { type: "coordinator", name: "Release Director" }
mcp__claude-flow__agent_spawn { type: "coder", name: "Version Manager" }
mcp__claude-flow__agent_spawn { type: "tester", name: "QA Engineer" }
mcp__claude-flow__agent_spawn { type: "reviewer", name: "Release Reviewer" }
mcp__claude-flow__agent_spawn { type: "analyst", name: "Deployment Analyst" }
mcp__claude-flow__agent_spawn { type: "researcher", name: "Compatibility Checker" }Coordinated Release Workflow
协同发布工作流
javascript
[Single Message - Full Release Coordination]:
// Create release branch
Bash("gh api repos/:owner/:repo/git/refs --method POST -f ref='refs/heads/release/v2.0.0' -f sha=$(gh api repos/:owner/:repo/git/refs/heads/main --jq '.object.sha')")
// Orchestrate release preparation
mcp__claude-flow__task_orchestrate {
task: "Prepare release v2.0.0 with comprehensive testing and validation",
strategy: "sequential",
priority: "critical",
maxAgents: 6
}
// Update all release files
Write("package.json", "[updated version]")
Write("CHANGELOG.md", "[release changelog]")
Write("RELEASE_NOTES.md", "[detailed notes]")
// Run comprehensive validation
Bash("npm install && npm test && npm run lint && npm run build")
// Create release PR
Bash(`gh pr create \
--title "Release v2.0.0: Feature Set and Improvements" \
--head "release/v2.0.0" \
--base "main" \
--body "$(cat RELEASE_NOTES.md)"`)
// Track progress
TodoWrite { todos: [
{ content: "Prepare release branch", status: "completed", priority: "critical" },
{ content: "Run validation suite", status: "completed", priority: "high" },
{ content: "Create release PR", status: "completed", priority: "high" },
{ content: "Code review approval", status: "pending", priority: "high" },
{ content: "Merge and deploy", status: "pending", priority: "critical" }
]}
// Store release state
mcp__claude-flow__memory_usage {
action: "store",
key: "release/v2.0.0/status",
value: JSON.stringify({
version: "2.0.0",
stage: "validation_complete",
timestamp: Date.now(),
ready_for_review: true
})
}javascript
[Single Message - Full Release Coordination]:
// 创建发布分支
Bash("gh api repos/:owner/:repo/git/refs --method POST -f ref='refs/heads/release/v2.0.0' -f sha=$(gh api repos/:owner/:repo/git/refs/heads/main --jq '.object.sha')")
// 编排发布准备工作
mcp__claude-flow__task_orchestrate {
task: "Prepare release v2.0.0 with comprehensive testing and validation",
strategy: "sequential",
priority: "critical",
maxAgents: 6
}
// 更新所有发布文件
Write("package.json", "[updated version]")
Write("CHANGELOG.md", "[release changelog]")
Write("RELEASE_NOTES.md", "[detailed notes]")
// 执行全面验证
Bash("npm install && npm test && npm run lint && npm run build")
// 创建发布PR
Bash(`gh pr create \
--title "Release v2.0.0: Feature Set and Improvements" \
--head "release/v2.0.0" \
--base "main" \
--body "$(cat RELEASE_NOTES.md)"`)
// 跟踪进度
TodoWrite { todos: [
{ content: "Prepare release branch", status: "completed", priority: "critical" },
{ content: "Run validation suite", status: "completed", priority: "high" },
{ content: "Create release PR", status: "completed", priority: "high" },
{ content: "Code review approval", status: "pending", priority: "high" },
{ content: "Merge and deploy", status: "pending", priority: "critical" }
]}
// 存储发布状态
mcp__claude-flow__memory_usage {
action: "store",
key: "release/v2.0.0/status",
value: JSON.stringify({
version: "2.0.0",
stage: "validation_complete",
timestamp: Date.now(),
ready_for_review: true
})
}Release Agent Specializations
发布Agent专长
Changelog Agent
变更日志Agent
bash
undefinedbash
undefinedGet merged PRs between versions
获取版本间合并的PR
PRS=$(gh pr list --state merged --base main --json number,title,labels,author,mergedAt
--jq ".[] | select(.mergedAt > "$(gh release view v1.0.0 --json publishedAt -q .publishedAt)")")
--jq ".[] | select(.mergedAt > "$(gh release view v1.0.0 --json publishedAt -q .publishedAt)")")
PRS=$(gh pr list --state merged --base main --json number,title,labels,author,mergedAt
--jq ".[] | select(.mergedAt > "$(gh release view v1.0.0 --json publishedAt -q .publishedAt)")")
--jq ".[] | select(.mergedAt > "$(gh release view v1.0.0 --json publishedAt -q .publishedAt)")")
Get commit history
获取提交历史
COMMITS=$(gh api repos/:owner/:repo/compare/v1.0.0...HEAD
--jq '.commits[].commit.message')
--jq '.commits[].commit.message')
COMMITS=$(gh api repos/:owner/:repo/compare/v1.0.0...HEAD
--jq '.commits[].commit.message')
--jq '.commits[].commit.message')
Generate categorized changelog
生成分类的变更日志
npx claude-flow github changelog
--prs "$PRS"
--commits "$COMMITS"
--from v1.0.0
--to HEAD
--categorize
--add-migration-guide
--prs "$PRS"
--commits "$COMMITS"
--from v1.0.0
--to HEAD
--categorize
--add-migration-guide
**Capabilities:**
- Semantic commit analysis
- Breaking change detection
- Contributor attribution
- Migration guide generation
- Multi-language supportnpx claude-flow github changelog
--prs "$PRS"
--commits "$COMMITS"
--from v1.0.0
--to HEAD
--categorize
--add-migration-guide
--prs "$PRS"
--commits "$COMMITS"
--from v1.0.0
--to HEAD
--categorize
--add-migration-guide
**能力:**
- 语义化提交分析
- 破坏性变更检测
- 贡献者署名
- 迁移指南生成
- 多语言支持Version Agent
版本Agent
bash
undefinedbash
undefinedIntelligent version suggestion
智能版本建议
npx claude-flow github version-suggest
--current v1.2.3
--analyze-commits
--check-compatibility
--suggest-pre-release
--current v1.2.3
--analyze-commits
--check-compatibility
--suggest-pre-release
**Logic:**
- Analyzes commit messages and PR labels
- Detects breaking changes via keywords
- Suggests appropriate version bump
- Handles pre-release versioning
- Validates version constraintsnpx claude-flow github version-suggest
--current v1.2.3
--analyze-commits
--check-compatibility
--suggest-pre-release
--current v1.2.3
--analyze-commits
--check-compatibility
--suggest-pre-release
**逻辑:**
- 分析提交信息和PR标签
- 通过关键词检测破坏性变更
- 建议合适的版本升级
- 处理预发布版本
- 验证版本约束Build Agent
构建Agent
bash
undefinedbash
undefinedMulti-platform build coordination
多平台构建协调
npx claude-flow github release-build
--platforms "linux,macos,windows"
--architectures "x64,arm64"
--parallel
--optimize-size
--platforms "linux,macos,windows"
--architectures "x64,arm64"
--parallel
--optimize-size
**Features:**
- Cross-platform compilation
- Parallel build execution
- Artifact optimization and compression
- Dependency bundling
- Build caching and reusenpx claude-flow github release-build
--platforms "linux,macos,windows"
--architectures "x64,arm64"
--parallel
--optimize-size
--platforms "linux,macos,windows"
--architectures "x64,arm64"
--parallel
--optimize-size
**特性:**
- 跨平台编译
- 并行构建执行
- 产物优化与压缩
- 依赖打包
- 构建缓存与复用Test Agent
测试Agent
bash
undefinedbash
undefinedComprehensive pre-release testing
全面的预发布测试
npx claude-flow github release-test
--suites "unit,integration,e2e,performance"
--environments "node:16,node:18,node:20"
--fail-fast false
--generate-report
--suites "unit,integration,e2e,performance"
--environments "node:16,node:18,node:20"
--fail-fast false
--generate-report
undefinednpx claude-flow github release-test
--suites "unit,integration,e2e,performance"
--environments "node:16,node:18,node:20"
--fail-fast false
--generate-report
--suites "unit,integration,e2e,performance"
--environments "node:16,node:18,node:20"
--fail-fast false
--generate-report
undefinedDeploy Agent
部署Agent
bash
undefinedbash
undefinedMulti-target deployment orchestration
多目标部署编排
npx claude-flow github release-deploy
--targets "npm,docker,github,s3"
--staged-rollout
--monitor-metrics
--auto-rollback
--targets "npm,docker,github,s3"
--staged-rollout
--monitor-metrics
--auto-rollback
---npx claude-flow github release-deploy
--targets "npm,docker,github,s3"
--staged-rollout
--monitor-metrics
--auto-rollback
--targets "npm,docker,github,s3"
--staged-rollout
--monitor-metrics
--auto-rollback
---Progressive Disclosure: Level 3 - Advanced Workflows
渐进式披露:3级 - 高级工作流
Multi-Package Release Coordination
多包发布协调
Monorepo Release Strategy
Monorepo发布策略
javascript
[Single Message - Multi-Package Release]:
// Initialize mesh topology for cross-package coordination
mcp__claude-flow__swarm_init { topology: "mesh", maxAgents: 8 }
// Spawn package-specific agents
Task("Package A Manager", "Coordinate claude-flow package release v1.0.72", "coder")
Task("Package B Manager", "Coordinate ruv-swarm package release v1.0.12", "coder")
Task("Integration Tester", "Validate cross-package compatibility", "tester")
Task("Version Coordinator", "Align dependencies and versions", "coordinator")
// Update all packages simultaneously
Write("packages/claude-flow/package.json", "[v1.0.72 content]")
Write("packages/ruv-swarm/package.json", "[v1.0.12 content]")
Write("CHANGELOG.md", "[consolidated changelog]")
// Run cross-package validation
Bash("cd packages/claude-flow && npm install && npm test")
Bash("cd packages/ruv-swarm && npm install && npm test")
Bash("npm run test:integration")
// Create unified release PR
Bash(`gh pr create \
--title "Release: claude-flow v1.0.72, ruv-swarm v1.0.12" \
--body "Multi-package coordinated release with cross-compatibility validation"`)javascript
[Single Message - Multi-Package Release]:
// 初始化网格拓扑用于跨包协调
mcp__claude-flow__swarm_init { topology: "mesh", maxAgents: 8 }
// 生成包专用Agent
Task("Package A Manager", "Coordinate claude-flow package release v1.0.72", "coder")
Task("Package B Manager", "Coordinate ruv-swarm package release v1.0.12", "coder")
Task("Integration Tester", "Validate cross-package compatibility", "tester")
Task("Version Coordinator", "Align dependencies and versions", "coordinator")
// 同时更新所有包
Write("packages/claude-flow/package.json", "[v1.0.72 content]")
Write("packages/ruv-swarm/package.json", "[v1.0.12 content]")
Write("CHANGELOG.md", "[consolidated changelog]")
// 执行跨包验证
Bash("cd packages/claude-flow && npm install && npm test")
Bash("cd packages/ruv-swarm && npm install && npm test")
Bash("npm run test:integration")
// 创建统一发布PR
Bash(`gh pr create \
--title "Release: claude-flow v1.0.72, ruv-swarm v1.0.12" \
--body "Multi-package coordinated release with cross-compatibility validation"`)Progressive Deployment Strategy
渐进式部署策略
Staged Rollout Configuration
分阶段发布配置
yaml
undefinedyaml
undefined.github/release-deployment.yml
.github/release-deployment.yml
deployment:
strategy: progressive
stages:
- name: canary
percentage: 5
duration: 1h
metrics:
- error-rate < 0.1%
- latency-p99 < 200ms
auto-advance: true
- name: partial
percentage: 25
duration: 4h
validation: automated-tests
approval: qa-team
- name: rollout
percentage: 50
duration: 8h
monitor: true
- name: full
percentage: 100
approval: release-manager
rollback-enabled: trueundefineddeployment:
strategy: progressive
stages:
- name: canary
percentage: 5
duration: 1h
metrics:
- error-rate < 0.1%
- latency-p99 < 200ms
auto-advance: true
- name: partial
percentage: 25
duration: 4h
validation: automated-tests
approval: qa-team
- name: rollout
percentage: 50
duration: 8h
monitor: true
- name: full
percentage: 100
approval: release-manager
rollback-enabled: trueundefinedExecute Staged Deployment
执行分阶段部署
bash
undefinedbash
undefinedDeploy with progressive rollout
渐进式发布部署
npx claude-flow github release-deploy
--version v2.0.0
--strategy progressive
--config .github/release-deployment.yml
--monitor-metrics
--auto-rollback-on-error
--version v2.0.0
--strategy progressive
--config .github/release-deployment.yml
--monitor-metrics
--auto-rollback-on-error
undefinednpx claude-flow github release-deploy
--version v2.0.0
--strategy progressive
--config .github/release-deployment.yml
--monitor-metrics
--auto-rollback-on-error
--version v2.0.0
--strategy progressive
--config .github/release-deployment.yml
--monitor-metrics
--auto-rollback-on-error
undefinedMulti-Repository Coordination
多仓库协调
Coordinated Multi-Repo Release
协同多仓库发布
bash
undefinedbash
undefinedSynchronize releases across repositories
跨仓库同步发布
npx claude-flow github multi-release
--repos "frontend:v2.0.0,backend:v2.1.0,cli:v1.5.0"
--ensure-compatibility
--atomic-release
--synchronized
--rollback-all-on-failure
--repos "frontend:v2.0.0,backend:v2.1.0,cli:v1.5.0"
--ensure-compatibility
--atomic-release
--synchronized
--rollback-all-on-failure
undefinednpx claude-flow github multi-release
--repos "frontend:v2.0.0,backend:v2.1.0,cli:v1.5.0"
--ensure-compatibility
--atomic-release
--synchronized
--rollback-all-on-failure
--repos "frontend:v2.0.0,backend:v2.1.0,cli:v1.5.0"
--ensure-compatibility
--atomic-release
--synchronized
--rollback-all-on-failure
undefinedCross-Repo Dependency Management
跨仓库依赖管理
javascript
[Single Message - Cross-Repo Release]:
// Initialize star topology for centralized coordination
mcp__claude-flow__swarm_init { topology: "star", maxAgents: 6 }
// Spawn repo-specific coordinators
Task("Frontend Release", "Release frontend v2.0.0 with API compatibility", "coordinator")
Task("Backend Release", "Release backend v2.1.0 with breaking changes", "coordinator")
Task("CLI Release", "Release CLI v1.5.0 with new commands", "coordinator")
Task("Compatibility Checker", "Validate cross-repo compatibility", "researcher")
// Coordinate version updates across repos
Bash("gh api repos/org/frontend/dispatches --method POST -f event_type='release' -F client_payload[version]=v2.0.0")
Bash("gh api repos/org/backend/dispatches --method POST -f event_type='release' -F client_payload[version]=v2.1.0")
Bash("gh api repos/org/cli/dispatches --method POST -f event_type='release' -F client_payload[version]=v1.5.0")
// Monitor all releases
mcp__claude-flow__swarm_monitor { interval: 5, duration: 300 }javascript
[Single Message - Cross-Repo Release]:
// 初始化星型拓扑用于集中协调
mcp__claude-flow__swarm_init { topology: "star", maxAgents: 6 }
// 生成仓库专用协调器
Task("Frontend Release", "Release frontend v2.0.0 with API compatibility", "coordinator")
Task("Backend Release", "Release backend v2.1.0 with breaking changes", "coordinator")
Task("CLI Release", "Release CLI v1.5.0 with new commands", "coordinator")
Task("Compatibility Checker", "Validate cross-repo compatibility", "researcher")
// 协调跨仓库版本更新
Bash("gh api repos/org/frontend/dispatches --method POST -f event_type='release' -F client_payload[version]=v2.0.0")
Bash("gh api repos/org/backend/dispatches --method POST -f event_type='release' -F client_payload[version]=v2.1.0")
Bash("gh api repos/org/cli/dispatches --method POST -f event_type='release' -F client_payload[version]=v1.5.0")
// 监控所有发布
mcp__claude-flow__swarm_monitor { interval: 5, duration: 300 }Hotfix Emergency Procedures
热修复紧急流程
Emergency Hotfix Workflow
紧急热修复工作流
bash
undefinedbash
undefinedFast-track critical bug fix
快速推进关键bug修复
npx claude-flow github emergency-release
--issue 789
--severity critical
--target-version v1.2.4
--cherry-pick-commits
--bypass-checks security-only
--fast-track
--notify-all
--issue 789
--severity critical
--target-version v1.2.4
--cherry-pick-commits
--bypass-checks security-only
--fast-track
--notify-all
undefinednpx claude-flow github emergency-release
--issue 789
--severity critical
--target-version v1.2.4
--cherry-pick-commits
--bypass-checks security-only
--fast-track
--notify-all
--issue 789
--severity critical
--target-version v1.2.4
--cherry-pick-commits
--bypass-checks security-only
--fast-track
--notify-all
undefinedAutomated Hotfix Process
自动化热修复流程
javascript
[Single Message - Emergency Hotfix]:
// Create hotfix branch from last stable release
Bash("git checkout -b hotfix/v1.2.4 v1.2.3")
// Cherry-pick critical fixes
Bash("git cherry-pick abc123def")
// Fast validation
Bash("npm run test:critical && npm run build")
// Create emergency release
Bash(`gh release create v1.2.4 \
--title "HOTFIX v1.2.4: Critical Security Patch" \
--notes "Emergency release addressing CVE-2024-XXXX" \
--prerelease=false`)
// Immediate deployment
Bash("npm publish --tag hotfix")
// Notify stakeholders
Bash(`gh issue create \
--title "🚨 HOTFIX v1.2.4 Deployed" \
--body "Critical security patch deployed. Please update immediately." \
--label "critical,security,hotfix"`)javascript
[Single Message - Emergency Hotfix]:
// 从最近的稳定版本创建热修复分支
Bash("git checkout -b hotfix/v1.2.4 v1.2.3")
// 拣选关键修复提交
Bash("git cherry-pick abc123def")
// 快速验证
Bash("npm run test:critical && npm run build")
// 创建紧急发布
Bash(`gh release create v1.2.4 \
--title "HOTFIX v1.2.4: Critical Security Patch" \
--notes "Emergency release addressing CVE-2024-XXXX" \
--prerelease=false`)
// 立即部署
Bash("npm publish --tag hotfix")
// 通知涉众
Bash(`gh issue create \
--title "🚨 HOTFIX v1.2.4 Deployed" \
--body "Critical security patch deployed. Please update immediately." \
--label "critical,security,hotfix"`)Progressive Disclosure: Level 4 - Enterprise Features
渐进式披露:4级 - 企业级特性
Release Configuration Management
发布配置管理
Comprehensive Release Config
全量发布配置
yaml
undefinedyaml
undefined.github/release-swarm.yml
.github/release-swarm.yml
version: 2.0.0
release:
versioning:
strategy: semantic
breaking-keywords: ["BREAKING", "BREAKING CHANGE", "!"]
feature-keywords: ["feat", "feature"]
fix-keywords: ["fix", "bugfix"]
changelog:
sections:
- title: "🚀 Features"
labels: ["feature", "enhancement"]
emoji: true
- title: "🐛 Bug Fixes"
labels: ["bug", "fix"]
- title: "💥 Breaking Changes"
labels: ["breaking"]
highlight: true
- title: "📚 Documentation"
labels: ["docs", "documentation"]
- title: "⚡ Performance"
labels: ["performance", "optimization"]
- title: "🔒 Security"
labels: ["security"]
priority: critical
artifacts:
- name: npm-package
build: npm run build
test: npm run test:all
publish: npm publish
registry: https://registry.npmjs.org
- name: docker-image
build: docker build -t app:$VERSION .
test: docker run app:$VERSION npm test
publish: docker push app:$VERSION
platforms: [linux/amd64, linux/arm64]
- name: binaries
build: ./scripts/build-binaries.sh
platforms: [linux, macos, windows]
architectures: [x64, arm64]
upload: github-release
sign: truevalidation:
pre-release:
- lint: npm run lint
- typecheck: npm run typecheck
- unit-tests: npm run test:unit
- integration-tests: npm run test:integration
- security-scan: npm audit
- license-check: npm run license-check
post-release:
- smoke-tests: npm run test:smoke
- deployment-validation: ./scripts/validate-deployment.sh
- performance-baseline: npm run benchmarkdeployment:
environments:
- name: staging
auto-deploy: true
validation: npm run test:e2e
approval: false
- name: production
auto-deploy: false
approval-required: true
approvers: ["release-manager", "tech-lead"]
rollback-enabled: true
health-checks:
- endpoint: /health
expected: 200
timeout: 30smonitoring:
metrics:
- error-rate: <1%
- latency-p95: <500ms
- availability: >99.9%
- memory-usage: <80%
alerts:
- type: slack
channel: releases
on: [deploy, rollback, error]
- type: email
recipients: ["team@company.com"]
on: [critical-error, rollback]
- type: pagerduty
service: production-releases
on: [critical-error]rollback:
auto-rollback:
triggers:
- error-rate > 5%
- latency-p99 > 2000ms
- availability < 99%
grace-period: 5m
manual-rollback:
preserve-data: true
notify-users: true
create-incident: trueundefinedversion: 2.0.0
release:
versioning:
strategy: semantic
breaking-keywords: ["BREAKING", "BREAKING CHANGE", "!"]
feature-keywords: ["feat", "feature"]
fix-keywords: ["fix", "bugfix"]
changelog:
sections:
- title: "🚀 Features"
labels: ["feature", "enhancement"]
emoji: true
- title: "🐛 Bug Fixes"
labels: ["bug", "fix"]
- title: "💥 Breaking Changes"
labels: ["breaking"]
highlight: true
- title: "📚 Documentation"
labels: ["docs", "documentation"]
- title: "⚡ Performance"
labels: ["performance", "optimization"]
- title: "🔒 Security"
labels: ["security"]
priority: critical
artifacts:
- name: npm-package
build: npm run build
test: npm run test:all
publish: npm publish
registry: https://registry.npmjs.org
- name: docker-image
build: docker build -t app:$VERSION .
test: docker run app:$VERSION npm test
publish: docker push app:$VERSION
platforms: [linux/amd64, linux/arm64]
- name: binaries
build: ./scripts/build-binaries.sh
platforms: [linux, macos, windows]
architectures: [x64, arm64]
upload: github-release
sign: truevalidation:
pre-release:
- lint: npm run lint
- typecheck: npm run typecheck
- unit-tests: npm run test:unit
- integration-tests: npm run test:integration
- security-scan: npm audit
- license-check: npm run license-check
post-release:
- smoke-tests: npm run test:smoke
- deployment-validation: ./scripts/validate-deployment.sh
- performance-baseline: npm run benchmarkdeployment:
environments:
- name: staging
auto-deploy: true
validation: npm run test:e2e
approval: false
- name: production
auto-deploy: false
approval-required: true
approvers: ["release-manager", "tech-lead"]
rollback-enabled: true
health-checks:
- endpoint: /health
expected: 200
timeout: 30smonitoring:
metrics:
- error-rate: <1%
- latency-p95: <500ms
- availability: >99.9%
- memory-usage: <80%
alerts:
- type: slack
channel: releases
on: [deploy, rollback, error]
- type: email
recipients: ["team@company.com"]
on: [critical-error, rollback]
- type: pagerduty
service: production-releases
on: [critical-error]rollback:
auto-rollback:
triggers:
- error-rate > 5%
- latency-p99 > 2000ms
- availability < 99%
grace-period: 5m
manual-rollback:
preserve-data: true
notify-users: true
create-incident: trueundefinedAdvanced Testing Strategies
高级测试策略
Comprehensive Validation Suite
全量验证套件
bash
undefinedbash
undefinedPre-release validation with all checks
全检查项预发布验证
npx claude-flow github release-validate
--checks " version-conflicts, dependency-compatibility, api-breaking-changes, security-vulnerabilities, performance-regression, documentation-completeness, license-compliance, backwards-compatibility "
--block-on-failure
--generate-report
--upload-results
--checks " version-conflicts, dependency-compatibility, api-breaking-changes, security-vulnerabilities, performance-regression, documentation-completeness, license-compliance, backwards-compatibility "
--block-on-failure
--generate-report
--upload-results
undefinednpx claude-flow github release-validate
--checks " version-conflicts, dependency-compatibility, api-breaking-changes, security-vulnerabilities, performance-regression, documentation-completeness, license-compliance, backwards-compatibility "
--block-on-failure
--generate-report
--upload-results
--checks " version-conflicts, dependency-compatibility, api-breaking-changes, security-vulnerabilities, performance-regression, documentation-completeness, license-compliance, backwards-compatibility "
--block-on-failure
--generate-report
--upload-results
undefinedBackward Compatibility Testing
向后兼容性测试
bash
undefinedbash
undefinedTest against previous versions
与旧版本进行兼容性测试
npx claude-flow github compat-test
--previous-versions "v1.0,v1.1,v1.2"
--api-contracts
--data-migrations
--integration-tests
--generate-report
--previous-versions "v1.0,v1.1,v1.2"
--api-contracts
--data-migrations
--integration-tests
--generate-report
undefinednpx claude-flow github compat-test
--previous-versions "v1.0,v1.1,v1.2"
--api-contracts
--data-migrations
--integration-tests
--generate-report
--previous-versions "v1.0,v1.1,v1.2"
--api-contracts
--data-migrations
--integration-tests
--generate-report
undefinedPerformance Regression Detection
性能回归检测
bash
undefinedbash
undefinedBenchmark against baseline
与基线版本进行基准测试
npx claude-flow github performance-test
--baseline v1.9.0
--candidate v2.0.0
--metrics "throughput,latency,memory,cpu"
--threshold 5%
--fail-on-regression
--baseline v1.9.0
--candidate v2.0.0
--metrics "throughput,latency,memory,cpu"
--threshold 5%
--fail-on-regression
undefinednpx claude-flow github performance-test
--baseline v1.9.0
--candidate v2.0.0
--metrics "throughput,latency,memory,cpu"
--threshold 5%
--fail-on-regression
--baseline v1.9.0
--candidate v2.0.0
--metrics "throughput,latency,memory,cpu"
--threshold 5%
--fail-on-regression
undefinedRelease Monitoring & Analytics
发布监控与分析
Real-Time Release Monitoring
实时发布监控
bash
undefinedbash
undefinedMonitor release health post-deployment
部署后监控发布健康状态
npx claude-flow github release-monitor
--version v2.0.0
--metrics "error-rate,latency,throughput,adoption"
--alert-thresholds
--duration 24h
--export-dashboard
--version v2.0.0
--metrics "error-rate,latency,throughput,adoption"
--alert-thresholds
--duration 24h
--export-dashboard
undefinednpx claude-flow github release-monitor
--version v2.0.0
--metrics "error-rate,latency,throughput,adoption"
--alert-thresholds
--duration 24h
--export-dashboard
--version v2.0.0
--metrics "error-rate,latency,throughput,adoption"
--alert-thresholds
--duration 24h
--export-dashboard
undefinedRelease Analytics & Insights
发布分析与洞察
bash
undefinedbash
undefinedAnalyze release performance and adoption
分析发布性能与采用情况
npx claude-flow github release-analytics
--version v2.0.0
--compare-with v1.9.0
--metrics "adoption,performance,stability,feedback"
--generate-insights
--export-report
--version v2.0.0
--compare-with v1.9.0
--metrics "adoption,performance,stability,feedback"
--generate-insights
--export-report
undefinednpx claude-flow github release-analytics
--version v2.0.0
--compare-with v1.9.0
--metrics "adoption,performance,stability,feedback"
--generate-insights
--export-report
--version v2.0.0
--compare-with v1.9.0
--metrics "adoption,performance,stability,feedback"
--generate-insights
--export-report
undefinedAutomated Rollback Configuration
自动化回滚配置
bash
undefinedbash
undefinedConfigure intelligent auto-rollback
配置智能自动回滚
npx claude-flow github rollback-config
--triggers '{ "error-rate": ">5%", "latency-p99": ">1000ms", "availability": "<99.9%", "failed-health-checks": ">3" }'
--grace-period 5m
--notify-on-rollback
--preserve-metrics
--triggers '{ "error-rate": ">5%", "latency-p99": ">1000ms", "availability": "<99.9%", "failed-health-checks": ">3" }'
--grace-period 5m
--notify-on-rollback
--preserve-metrics
undefinednpx claude-flow github rollback-config
--triggers '{ "error-rate": ">5%", "latency-p99": ">1000ms", "availability": "<99.9%", "failed-health-checks": ">3" }'
--grace-period 5m
--notify-on-rollback
--preserve-metrics
--triggers '{ "error-rate": ">5%", "latency-p99": ">1000ms", "availability": "<99.9%", "failed-health-checks": ">3" }'
--grace-period 5m
--notify-on-rollback
--preserve-metrics
undefinedSecurity & Compliance
安全与合规
Security Scanning
安全扫描
bash
undefinedbash
undefinedComprehensive security validation
全量安全验证
npx claude-flow github release-security
--scan-dependencies
--check-secrets
--audit-permissions
--sign-artifacts
--sbom-generation
--vulnerability-report
--scan-dependencies
--check-secrets
--audit-permissions
--sign-artifacts
--sbom-generation
--vulnerability-report
undefinednpx claude-flow github release-security
--scan-dependencies
--check-secrets
--audit-permissions
--sign-artifacts
--sbom-generation
--vulnerability-report
--scan-dependencies
--check-secrets
--audit-permissions
--sign-artifacts
--sbom-generation
--vulnerability-report
undefinedCompliance Validation
合规验证
bash
undefinedbash
undefinedEnsure regulatory compliance
确保符合监管要求
npx claude-flow github release-compliance
--standards "SOC2,GDPR,HIPAA"
--license-audit
--data-governance
--audit-trail
--generate-attestation
--standards "SOC2,GDPR,HIPAA"
--license-audit
--data-governance
--audit-trail
--generate-attestation
---npx claude-flow github release-compliance
--standards "SOC2,GDPR,HIPAA"
--license-audit
--data-governance
--audit-trail
--generate-attestation
--standards "SOC2,GDPR,HIPAA"
--license-audit
--data-governance
--audit-trail
--generate-attestation
---GitHub Actions Integration
GitHub Actions 集成
Complete Release Workflow
完整发布工作流
yaml
undefinedyaml
undefined.github/workflows/release.yml
.github/workflows/release.yml
name: Intelligent Release Workflow
on:
push:
tags: ['v*']
jobs:
release-orchestration:
runs-on: ubuntu-latest
permissions:
contents: write
packages: write
issues: write
steps:
- name: Checkout Repository
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: '20'
cache: 'npm'
- name: Authenticate GitHub CLI
run: echo "${{ secrets.GITHUB_TOKEN }}" | gh auth login --with-token
- name: Initialize Release Swarm
run: |
# Extract version from tag
RELEASE_TAG=${{ github.ref_name }}
PREV_TAG=$(gh release list --limit 2 --json tagName -q '.[1].tagName')
# Get merged PRs for changelog
PRS=$(gh pr list --state merged --base main --json number,title,labels,author,mergedAt \
--jq ".[] | select(.mergedAt > \"$(gh release view $PREV_TAG --json publishedAt -q .publishedAt)\")")
# Get commit history
COMMITS=$(gh api repos/${{ github.repository }}/compare/${PREV_TAG}...HEAD \
--jq '.commits[].commit.message')
# Initialize swarm coordination
npx claude-flow@alpha swarm init --topology hierarchical
# Store release context
echo "$PRS" > /tmp/release-prs.json
echo "$COMMITS" > /tmp/release-commits.txt
- name: Generate Release Changelog
run: |
# Generate intelligent changelog
CHANGELOG=$(npx claude-flow@alpha github changelog \
--prs "$(cat /tmp/release-prs.json)" \
--commits "$(cat /tmp/release-commits.txt)" \
--from $PREV_TAG \
--to $RELEASE_TAG \
--categorize \
--add-migration-guide \
--format markdown)
echo "$CHANGELOG" > RELEASE_CHANGELOG.md
- name: Build Release Artifacts
run: |
# Install dependencies
npm ci
# Run comprehensive validation
npm run lint
npm run typecheck
npm run test:all
npm run build
# Build platform-specific binaries
npx claude-flow@alpha github release-build \
--platforms "linux,macos,windows" \
--architectures "x64,arm64" \
--parallel
- name: Security Scan
run: |
# Run security validation
npm audit --audit-level=moderate
npx claude-flow@alpha github release-security \
--scan-dependencies \
--check-secrets \
--sign-artifacts
- name: Create GitHub Release
run: |
# Update release with generated changelog
gh release edit ${{ github.ref_name }} \
--notes "$(cat RELEASE_CHANGELOG.md)" \
--draft=false
# Upload all artifacts
for file in dist/*; do
gh release upload ${{ github.ref_name }} "$file"
done
- name: Deploy to Package Registries
run: |
# Publish to npm
echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > .npmrc
npm publish
# Build and push Docker images
docker build -t ${{ github.repository }}:${{ github.ref_name }} .
docker push ${{ github.repository }}:${{ github.ref_name }}
- name: Post-Release Validation
run: |
# Run smoke tests
npm run test:smoke
# Validate deployment
npx claude-flow@alpha github release-validate \
--version ${{ github.ref_name }} \
--smoke-tests \
--health-checks
- name: Create Release Announcement
run: |
# Create announcement issue
gh issue create \
--title "🎉 Released ${{ github.ref_name }}" \
--body "$(cat RELEASE_CHANGELOG.md)" \
--label "announcement,release"
# Notify via discussion
gh api repos/${{ github.repository }}/discussions \
--method POST \
-f title="Release ${{ github.ref_name }} Now Available" \
-f body="$(cat RELEASE_CHANGELOG.md)" \
-f category_id="$(gh api repos/${{ github.repository }}/discussions/categories --jq '.[] | select(.slug=="announcements") | .id')"
- name: Monitor Release
run: |
# Start release monitoring
npx claude-flow@alpha github release-monitor \
--version ${{ github.ref_name }} \
--duration 1h \
--alert-on-errors &undefinedname: Intelligent Release Workflow
on:
push:
tags: ['v*']
jobs:
release-orchestration:
runs-on: ubuntu-latest
permissions:
contents: write
packages: write
issues: write
steps:
- name: Checkout Repository
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: '20'
cache: 'npm'
- name: Authenticate GitHub CLI
run: echo "${{ secrets.GITHUB_TOKEN }}" | gh auth login --with-token
- name: Initialize Release Swarm
run: |
# Extract version from tag
RELEASE_TAG=${{ github.ref_name }}
PREV_TAG=$(gh release list --limit 2 --json tagName -q '.[1].tagName')
# Get merged PRs for changelog
PRS=$(gh pr list --state merged --base main --json number,title,labels,author,mergedAt \
--jq ".[] | select(.mergedAt > \"$(gh release view $PREV_TAG --json publishedAt -q .publishedAt)\")")
# Get commit history
COMMITS=$(gh api repos/${{ github.repository }}/compare/${PREV_TAG}...HEAD \
--jq '.commits[].commit.message')
# Initialize swarm coordination
npx claude-flow@alpha swarm init --topology hierarchical
# Store release context
echo "$PRS" > /tmp/release-prs.json
echo "$COMMITS" > /tmp/release-commits.txt
- name: Generate Release Changelog
run: |
# Generate intelligent changelog
CHANGELOG=$(npx claude-flow@alpha github changelog \
--prs "$(cat /tmp/release-prs.json)" \
--commits "$(cat /tmp/release-commits.txt)" \
--from $PREV_TAG \
--to $RELEASE_TAG \
--categorize \
--add-migration-guide \
--format markdown)
echo "$CHANGELOG" > RELEASE_CHANGELOG.md
- name: Build Release Artifacts
run: |
# Install dependencies
npm ci
# Run comprehensive validation
npm run lint
npm run typecheck
npm run test:all
npm run build
# Build platform-specific binaries
npx claude-flow@alpha github release-build \
--platforms "linux,macos,windows" \
--architectures "x64,arm64" \
--parallel
- name: Security Scan
run: |
# Run security validation
npm audit --audit-level=moderate
npx claude-flow@alpha github release-security \
--scan-dependencies \
--check-secrets \
--sign-artifacts
- name: Create GitHub Release
run: |
# Update release with generated changelog
gh release edit ${{ github.ref_name }} \
--notes "$(cat RELEASE_CHANGELOG.md)" \
--draft=false
# Upload all artifacts
for file in dist/*; do
gh release upload ${{ github.ref_name }} "$file"
done
- name: Deploy to Package Registries
run: |
# Publish to npm
echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > .npmrc
npm publish
# Build and push Docker images
docker build -t ${{ github.repository }}:${{ github.ref_name }} .
docker push ${{ github.repository }}:${{ github.ref_name }}
- name: Post-Release Validation
run: |
# Run smoke tests
npm run test:smoke
# Validate deployment
npx claude-flow@alpha github release-validate \
--version ${{ github.ref_name }} \
--smoke-tests \
--health-checks
- name: Create Release Announcement
run: |
# Create announcement issue
gh issue create \
--title "🎉 Released ${{ github.ref_name }}" \
--body "$(cat RELEASE_CHANGELOG.md)" \
--label "announcement,release"
# Notify via discussion
gh api repos/${{ github.repository }}/discussions \
--method POST \
-f title="Release ${{ github.ref_name }} Now Available" \
-f body="$(cat RELEASE_CHANGELOG.md)" \
-f category_id="$(gh api repos/${{ github.repository }}/discussions/categories --jq '.[] | select(.slug=="announcements") | .id')"
- name: Monitor Release
run: |
# Start release monitoring
npx claude-flow@alpha github release-monitor \
--version ${{ github.ref_name }} \
--duration 1h \
--alert-on-errors &undefinedHotfix Workflow
热修复工作流
yaml
undefinedyaml
undefined.github/workflows/hotfix.yml
.github/workflows/hotfix.yml
name: Emergency Hotfix Workflow
on:
issues:
types: [labeled]
jobs:
emergency-hotfix:
if: contains(github.event.issue.labels.*.name, 'critical-hotfix')
runs-on: ubuntu-latest
steps:
- name: Create Hotfix Branch
run: |
LAST_STABLE=$(gh release list --limit 1 --json tagName -q '.[0].tagName')
HOTFIX_VERSION=$(echo $LAST_STABLE | awk -F. '{print $1"."$2"."$3+1}')
git checkout -b hotfix/$HOTFIX_VERSION $LAST_STABLE
- name: Fast-Track Testing
run: |
npm ci
npm run test:critical
npm run build
- name: Emergency Release
run: |
npx claude-flow@alpha github emergency-release \
--issue ${{ github.event.issue.number }} \
--severity critical \
--fast-track \
--notify-all
---name: Emergency Hotfix Workflow
on:
issues:
types: [labeled]
jobs:
emergency-hotfix:
if: contains(github.event.issue.labels.*.name, 'critical-hotfix')
runs-on: ubuntu-latest
steps:
- name: Create Hotfix Branch
run: |
LAST_STABLE=$(gh release list --limit 1 --json tagName -q '.[0].tagName')
HOTFIX_VERSION=$(echo $LAST_STABLE | awk -F. '{print $1"."$2"."$3+1}')
git checkout -b hotfix/$HOTFIX_VERSION $LAST_STABLE
- name: Fast-Track Testing
run: |
npm ci
npm run test:critical
npm run build
- name: Emergency Release
run: |
npx claude-flow@alpha github emergency-release \
--issue ${{ github.event.issue.number }} \
--severity critical \
--fast-track \
--notify-all
---Best Practices & Patterns
最佳实践与模式
Release Planning Guidelines
发布规划指南
1. Regular Release Cadence
1. 定期发布节奏
- Weekly: Patch releases with bug fixes
- Bi-weekly: Minor releases with features
- Quarterly: Major releases with breaking changes
- On-demand: Hotfixes for critical issues
- 每周: 包含bug修复的补丁版本发布
- 每两周: 包含新功能的次版本发布
- 每季度: 包含破坏性变更的主版本发布
- 按需: 针对关键问题的热修复发布
2. Feature Freeze Strategy
2. 功能冻结策略
- Code freeze 3 days before release
- Only critical bug fixes allowed
- Beta testing period for major releases
- Stakeholder communication plan
- 发布前3天代码冻结
- 仅允许关键bug修复提交
- 主版本需要Beta测试阶段
- 涉众沟通计划
3. Version Management Rules
3. 版本管理规则
- Strict semantic versioning compliance
- Breaking changes only in major versions
- Deprecation warnings one minor version ahead
- Cross-package version synchronization
- 严格遵守语义化版本规范
- 仅在主版本中包含破坏性变更
- 废弃警告提前一个次版本发布
- 跨包版本同步
Automation Recommendations
自动化建议
1. Comprehensive CI/CD Pipeline
1. 全链路CI/CD流水线
- Automated testing at every stage
- Security scanning before release
- Performance benchmarking
- Documentation generation
- 每个阶段都有自动化测试
- 发布前安全扫描
- 性能基准测试
- 文档生成
2. Progressive Deployment
2. 渐进式部署
- Canary releases for early detection
- Staged rollouts with monitoring
- Automated health checks
- Quick rollback mechanisms
- 金丝雀发布用于问题早发现
- 带监控的分阶段发布
- 自动化健康检查
- 快速回滚机制
3. Monitoring & Observability
3. 监控与可观测性
- Real-time error tracking
- Performance metrics collection
- User adoption analytics
- Feedback collection automation
- 实时错误追踪
- 性能指标采集
- 用户采用率分析
- 反馈收集自动化
Documentation Standards
文档标准
1. Changelog Requirements
1. 变更日志要求
- Categorized changes by type
- Breaking changes highlighted
- Migration guides for major versions
- Contributor attribution
- 按类型分类变更
- 高亮显示破坏性变更
- 主版本提供迁移指南
- 贡献者署名
2. Release Notes Content
2. 发布说明内容
- High-level feature summaries
- Detailed technical changes
- Upgrade instructions
- Known issues and limitations
- 高层功能概要
- 详细技术变更
- 升级指引
- 已知问题与限制
3. API Documentation
3. API文档
- Automated API doc generation
- Example code updates
- Deprecation notices
- Version compatibility matrix
- 自动化API文档生成
- 示例代码更新
- 废弃通知
- 版本兼容性矩阵
Troubleshooting & Common Issues
问题排查与常见问题
Issue: Failed Release Build
问题:发布构建失败
bash
undefinedbash
undefinedDebug build failures
调试构建失败
npx claude-flow@alpha diagnostic-run
--component build
--verbose
--component build
--verbose
npx claude-flow@alpha diagnostic-run
--component build
--verbose
--component build
--verbose
Retry with isolated environment
使用隔离环境重试
docker run --rm -v $(pwd):/app node:20
bash -c "cd /app && npm ci && npm run build"
bash -c "cd /app && npm ci && npm run build"
undefineddocker run --rm -v $(pwd):/app node:20
bash -c "cd /app && npm ci && npm run build"
bash -c "cd /app && npm ci && npm run build"
undefinedIssue: Test Failures in CI
问题:CI中测试失败
bash
undefinedbash
undefinedRun tests with detailed output
运行带详细输出的测试
npm run test -- --verbose --coverage
npm run test -- --verbose --coverage
Check for environment-specific issues
检查环境特定问题
npm run test:ci
npm run test:ci
Compare local vs CI environment
对比本地与CI环境
npx claude-flow@alpha github compat-test
--environments "local,ci"
--compare
--environments "local,ci"
--compare
undefinednpx claude-flow@alpha github compat-test
--environments "local,ci"
--compare
--environments "local,ci"
--compare
undefinedIssue: Deployment Rollback Needed
问题:需要部署回滚
bash
undefinedbash
undefinedImmediate rollback to previous version
立即回滚到之前版本
npx claude-flow@alpha github rollback
--to-version v1.9.9
--reason "Critical bug in v2.0.0"
--preserve-data
--notify-users
--to-version v1.9.9
--reason "Critical bug in v2.0.0"
--preserve-data
--notify-users
npx claude-flow@alpha github rollback
--to-version v1.9.9
--reason "Critical bug in v2.0.0"
--preserve-data
--notify-users
--to-version v1.9.9
--reason "Critical bug in v2.0.0"
--preserve-data
--notify-users
Investigate rollback cause
调查回滚原因
npx claude-flow@alpha github release-analytics
--version v2.0.0
--identify-issues
--version v2.0.0
--identify-issues
undefinednpx claude-flow@alpha github release-analytics
--version v2.0.0
--identify-issues
--version v2.0.0
--identify-issues
undefinedIssue: Version Conflicts
问题:版本冲突
bash
undefinedbash
undefinedCheck and resolve version conflicts
检查并解决版本冲突
npx claude-flow@alpha github release-validate
--checks version-conflicts
--auto-resolve
--checks version-conflicts
--auto-resolve
npx claude-flow@alpha github release-validate
--checks version-conflicts
--auto-resolve
--checks version-conflicts
--auto-resolve
Align multi-package versions
对齐多包版本
npx claude-flow@alpha github version-sync
--packages "package-a,package-b"
--strategy semantic
--packages "package-a,package-b"
--strategy semantic
---npx claude-flow@alpha github version-sync
--packages "package-a,package-b"
--strategy semantic
--packages "package-a,package-b"
--strategy semantic
---Performance Metrics & Benchmarks
性能指标与基准
Expected Performance
预期性能
- Release Planning: < 2 minutes
- Build Process: 3-8 minutes (varies by project)
- Test Execution: 5-15 minutes
- Deployment: 2-5 minutes per target
- Complete Pipeline: 15-30 minutes
- 发布规划: < 2分钟
- 构建流程: 3-8分钟 (因项目而异)
- 测试执行: 5-15分钟
- 部署: 每个目标2-5分钟
- 完整流水线: 15-30分钟
Optimization Tips
优化建议
- Parallel Execution: Use swarm coordination for concurrent tasks
- Caching: Enable build and dependency caching
- Incremental Builds: Only rebuild changed components
- Test Optimization: Run critical tests first, full suite in parallel
- 并行执行: 使用swarm协调并行任务
- 缓存: 启用构建与依赖缓存
- 增量构建: 仅重新构建变更组件
- 测试优化: 优先运行关键测试,全量测试并行执行
Success Metrics
成功指标
- Release Frequency: Target weekly minor releases
- Lead Time: < 2 hours from commit to production
- Failure Rate: < 2% of releases require rollback
- MTTR: < 30 minutes for critical hotfixes
- 发布频率: 目标每周次版本发布
- 交付周期: 从提交到生产<2小时
- 失败率: <2%的发布需要回滚
- 平均恢复时间: 关键热修复<30分钟
Related Resources
相关资源
Documentation
文档
- GitHub CLI Documentation
- Semantic Versioning Spec
- Claude Flow SPARC Guide
- Swarm Coordination Patterns
- GitHub CLI 文档
- 语义化版本规范
- Claude Flow SPARC 指南
- Swarm 协调模式
Related Skills
相关技能
- github-pr-management: PR review and merge automation
- github-workflow-automation: CI/CD workflow orchestration
- multi-repo-coordination: Cross-repository synchronization
- deployment-orchestration: Advanced deployment strategies
- github-pr-management: PR评审与合并自动化
- github-workflow-automation: CI/CD工作流编排
- multi-repo-coordination: 跨仓库同步
- deployment-orchestration: 高级部署策略
Support & Community
支持与社区
- Issues: https://github.com/ruvnet/claude-flow/issues
- Discussions: https://github.com/ruvnet/claude-flow/discussions
- Documentation: https://claude-flow.dev/docs
Appendix: Release Checklist Template
附录:发布检查清单模板
Pre-Release Checklist
预发布检查清单
- Version numbers updated across all packages
- Changelog generated and reviewed
- Breaking changes documented with migration guide
- All tests passing (unit, integration, e2e)
- Security scan completed with no critical issues
- Performance benchmarks within acceptable range
- Documentation updated (API docs, README, examples)
- Release notes drafted and reviewed
- Stakeholders notified of upcoming release
- Deployment plan reviewed and approved
- 所有包的版本号已更新
- 变更日志已生成并审核
- 破坏性变更已记录并附带迁移指南
- 所有测试通过(单元、集成、e2e)
- 安全扫描完成,无关键问题
- 性能基准在可接受范围内
- 文档已更新(API文档、README、示例)
- 发布说明已起草并审核
- 已通知涉众即将发布
- 部署计划已审核并批准
Release Checklist
发布检查清单
- Release branch created and validated
- CI/CD pipeline completed successfully
- Artifacts built and verified
- GitHub release created with proper notes
- Packages published to registries
- Docker images pushed to container registry
- Deployment to staging successful
- Smoke tests passing in staging
- Production deployment completed
- Health checks passing
- 发布分支已创建并验证
- CI/CD流水线执行成功
- 构建产物已生成并验证
- GitHub发布已创建,附带正确说明
- 包已发布到 registry
- Docker镜像已推送到容器 registry
- 预发环境部署成功
- 预发环境冒烟测试通过
- 生产环境部署完成
- 健康检查通过
Post-Release Checklist
发布后检查清单
- Release announcement published
- Monitoring dashboards reviewed
- Error rates within normal range
- Performance metrics stable
- User feedback collected
- Documentation links verified
- Release retrospective scheduled
- Next release planning initiated
Version: 2.0.0
Last Updated: 2025-10-19
Maintained By: Claude Flow Team
- 发布公告已发布
- 监控大盘已审核
- 错误率在正常范围内
- 性能指标稳定
- 用户反馈已收集
- 文档链接已验证
- 发布回顾会议已安排
- 下一次发布规划已启动
版本: 2.0.0
最后更新: 2025-10-19
维护方: Claude Flow Team