mcpField
Q
qe-github-release-management

qe-github-release-management

github.com/proffesor-for-testing云与 DevOps51981 次安装今天更新
代码仓库

关于 qe-github-release-management

面向团队的 GitHub 软件发布管理技能,支持自动化发布流程。内容涵盖版本规划、验证、构建、部署、监控和回滚,也包括多包及多仓库协调。

主要功能

  1. 01分析提交并建议版本
  2. 02生成变更日志和发布说明
  3. 03协调测试与跨平台构建
  4. 04分阶段部署并自动回滚
  5. 05协调多包和多仓库发布
  6. 06监控发布状态

适用场景

  1. 01准备带版本号的 GitHub 发布
  2. 02发布前验证构建
  3. 03分阶段推出版本
  4. 04协调多个仓库的发布

MCP 相关

该技能通过 claude-flow 工具展示基于 MCP 的编排,包括初始化 swarm 和为发布工作流编排任务。

安装

复制下面的命令,在终端中运行。

$npx skills add https://github.com/proffesor-for-testing/agentic-qe --skill qe-github-release-management

安装后在 Claude Code 中输入/qe-github-release-management确认已加载。

详细介绍

GitHub 发布管理技能

借助 AI swarm 实现智能发布自动化与编排,全面管理软件发布流程——从生成变更日志到跨平台部署,并支持回滚。

快速入门

简单发布流程
# Plan and create a release
gh release create v2.0.0 \
  --draft \
  --generate-notes \
  --title "Release v2.0.0"

# Orchestrate with swarm
npx claude-flow github release-create \
  --version "2.0.0" \
  --build-artifacts \
  --deploy-targets "npm,docker,github"
全自动发布
# Initialize release swarm
npx claude-flow swarm init --topology hierarchical

# Execute complete release pipeline
npx claude-flow sparc pipeline "Release v2.0.0 with full validation"

核心能力

1. 发布规划与版本管理
  • 语义化版本分析与建议
  • 根据提交检测破坏性变更
  • 生成发布计划时间线
  • 协调多个软件包的版本
2. 自动化测试与验证
  • 多阶段测试编排
  • 跨平台兼容性测试
  • 性能回归检测
  • 安全漏洞扫描
3. 构建与部署编排
  • 协调多平台构建
  • 并行生成构建产物
  • 渐进式部署策略
  • 自动回滚机制
4. 文档与沟通
  • 自动生成变更日志
  • 按类别整理发布说明
  • 创建迁移指南
  • 通知利益相关方

渐进式展开:第 1 级 - 基本用法

必备发布命令
创建发布草稿
# Get last release tag
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')

# Create draft release
gh release create v2.0.0 \
  --draft \
  --title "Release v2.0.0" \
  --notes "$CHANGELOG" \
  --target main
基本版本升级
# Update package.json version
npm version patch  # or minor, major

# Push version tag
git push --follow-tags
简单部署
# Build and publish npm package
npm run build
npm publish

# Create GitHub release
gh release create $(npm pkg get version) \
  --generate-notes
快速集成示例
// 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'")

渐进式展开:第 2 级 - Swarm 协同

AI Swarm 发布编排
初始化发布 Swarm
// 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" }
协同发布工作流
[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
    })
  }
发布 Agent 专项分工
变更日志 Agent
# Get merged PRs between versions
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)\")")

# Get commit history
COMMITS=$(gh api repos/:owner/:repo/compare/v1.0.0...HEAD \
  --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

能力:

  • 语义化提交分析
  • 检测破坏性变更
  • 归属贡献者
  • 生成迁移指南
  • 支持多种语言
版本 Agent
# Intelligent version suggestion
npx claude-flow github version-suggest \
  --current v1.2.3 \
  --analyze-commits \
  --check-compatibility \
  --suggest-pre-release

逻辑:

  • 分析提交消息和 PR 标签
  • 通过关键词检测破坏性变更
  • 建议合适的版本升级
  • 处理预发布版本号
  • 验证版本约束
构建 Agent
# Multi-platform build coordination
npx claude-flow github release-build \
  --platforms "linux,macos,windows" \
  --architectures "x64,arm64" \
  --parallel \
  --optimize-size

功能:

  • 跨平台编译
  • 并行执行构建
  • 优化并压缩构建产物
  • 打包依赖项
  • 缓存并复用构建结果
测试 Agent
# Comprehensive 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
部署 Agent
# Multi-target deployment orchestration
npx claude-flow github release-deploy \
  --targets "npm,docker,github,s3" \
  --staged-rollout \
  --monitor-metrics \
  --auto-rollback

渐进式展开:第 3 级 - 高级工作流

多软件包发布协调
Monorepo 发布策略
[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"`)
渐进式部署策略
分阶段发布配置
# .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: true
执行分阶段部署
# Deploy 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
多仓库协调
协同多仓库发布
# Synchronize 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
跨仓库依赖管理
[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 }
热修复紧急流程
紧急热修复工作流
# Fast-track critical bug fix
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
自动化热修复流程
[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"`)

渐进式展开:第 4 级 - 企业功能

发布配置管理
完整发布配置
# .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: true

  validation:
    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 benchmark

  deployment:
    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: 30s

  monitoring:
    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: ["[email protected]"]
        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: true
高级测试策略
全面验证套件
# Pre-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
向后兼容性测试
# Test 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
性能回归检测
# Benchmark 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
发布监控与分析
实时发布监控
# Monitor 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
发布分析与洞察
# Analyze 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
自动回滚配置
# Configure 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
安全与合规
安全扫描
# Comprehensive security validation
npx claude-flow github release-security \
  --scan-dependencies \
  --check-secrets \
  --audit-permissions \
  --sign-artifacts \
  --sbom-generation \
  --vulnerability-report
合规性验证
# Ensure regulatory compliance
npx claude-flow github release-compliance \
  --standards "SOC2,GDPR,HIPAA" \
  --license-audit \
  --data-governance \
  --audit-trail \
  --generate-attestation

GitHub Actions 集成

完整发布工作流
# .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 &
热修复工作流
# .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

最佳实践与模式

发布规划指南
1. 定期发布节奏
  • 每周:发布包含错误修复的补丁版本
  • 每两周:发布包含新功能的次要版本
  • 每季度:发布包含破坏性变更的主要版本
  • 按需:针对关键问题发布热修复
2. 功能冻结策略
  • 在发布前 3 天冻结代码
  • 只允许修复关键错误
  • 主要版本应安排 Beta 测试期
  • 制定利益相关方沟通计划
3. 版本管理规则
  • 严格遵循语义化版本规范
  • 仅在主版本中引入破坏性变更
  • 提前一个次版本发布弃用警告
  • 跨软件包版本同步
自动化建议
1. 完善的 CI/CD 流水线
  • 在每个阶段执行自动化测试
  • 发布前进行安全扫描
  • 进行性能基准测试
  • 生成文档
2. 渐进式部署
  • 通过金丝雀发布及早发现问题
  • 分阶段发布并进行监控
  • 自动化健康检查
  • 快速回滚机制
3. 监控与可观测性
  • 实时错误跟踪
  • 收集性能指标
  • 分析用户采用情况
  • 自动化收集反馈
文档规范
1. 更新日志要求
  • 按类型分类变更
  • 突出显示破坏性变更
  • 为主版本提供迁移指南
  • 标注贡献者
2. 发行说明内容
  • 高层次功能摘要
  • 详细的技术变更
  • 升级说明
  • 已知问题与限制
3. API 文档
  • 自动生成 API 文档
  • 更新示例代码
  • 弃用通知
  • 版本兼容性矩阵

故障排除与常见问题

问题:发布构建失败
# Debug build failures
npx claude-flow@alpha diagnostic-run \
  --component build \
  --verbose

# Retry with isolated environment
docker run --rm -v $(pwd):/app node:20 \
  bash -c "cd /app && npm ci && npm run build"
问题:CI 中测试失败
# Run tests with detailed output
npm run test -- --verbose --coverage

# Check for environment-specific issues
npm run test:ci

# Compare local vs CI environment
npx claude-flow@alpha github compat-test \
  --environments "local,ci" \
  --compare
问题:需要回滚部署
# Immediate 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

# Investigate rollback cause
npx claude-flow@alpha github release-analytics \
  --version v2.0.0 \
  --identify-issues
问题:版本冲突
# Check and resolve version conflicts
npx claude-flow@alpha github release-validate \
  --checks version-conflicts \
  --auto-resolve

# Align multi-package versions
npx claude-flow@alpha github version-sync \
  --packages "package-a,package-b" \
  --strategy semantic

性能指标与基准测试

预期性能
  • 发布规划:< 2 分钟
  • 构建流程:3-8 分钟(因项目而异)
  • 测试执行:5-15 分钟
  • 部署:每个目标 2-5 分钟
  • 完整流水线:15-30 分钟
优化技巧
  1. 并行执行:使用 swarm 协调并发任务
  2. 缓存:启用构建和依赖项缓存
  3. 增量构建:仅重新构建已更改的组件
  4. 测试优化:先运行关键测试,同时并行运行完整测试套件
成功指标
  • 发布频率:目标为每周发布次版本
  • 前置时间:从提交到生产环境 < 2 小时
  • 失败率:需要回滚的发布占比 < 2%
  • MTTR:关键热修复的平均恢复时间 < 30 分钟

相关资源

文档
相关技能
  • github-pr-management:PR 审核与合并自动化
  • github-workflow-automation:CI/CD 工作流编排
  • multi-repo-coordination:跨仓库同步
  • deployment-orchestration:高级部署策略
支持与社区

附录:发布检查清单模板

发布前检查清单
  • 已更新所有软件包的版本号
  • 已生成并审核更新日志
  • 已使用迁移指南记录破坏性变更
  • 所有测试均已通过(单元测试、集成测试、端到端测试)
  • 已完成安全扫描,且不存在严重问题
  • 性能基准测试结果处于可接受范围内
  • 已更新文档(API 文档、README、示例)
  • 已起草并审核发行说明
  • 已通知相关方即将发布
  • 已审核并批准部署计划
发布检查清单
  • 已创建并验证发布分支
  • CI/CD 流水线已成功完成
  • 已构建并验证构件
  • 已创建包含适当说明的 GitHub 发行版
  • 已将软件包发布到注册表
  • 已将 Docker 镜像推送到容器注册表
  • 已成功部署到预发布环境
  • 预发布环境中的冒烟测试已通过
  • 已完成生产环境部署
  • 健康检查已通过
发布后检查清单
  • 已发布版本公告
  • 已检查监控仪表盘
  • 错误率处于正常范围
  • 性能指标稳定
  • 已收集用户反馈
  • 已验证文档链接
  • 已安排发布回顾
  • 已启动下一版本的规划

版本:2.0.0 最后更新:2025-10-19 维护者:Claude Flow Team

评论

支持 Markdown