Home / Market / prepare release

prepare release

prepare-release

claude-command★ 347220 dlgithubMITInstall in CosmosUpstream Source

Documentation & Preview

--- allowed-tools: Read, Write, Edit, Bash argument-hint: [version-type] | patch | minor | major | --pre-release | --hotfix description: Prepare and validate release packages with comprehensive testing, documentation, and automation

---

Release Preparation

Prepare and validate release: $ARGUMENTS

Current Release Context

Task

Systematic release preparation: $ARGUMENTS

  1. Release Planning and Validation
  1. Pre-Release Checklist
  1. Version Management
   # Check current version
   git describe --tags --abbrev=0
   
   # Determine next version (semantic versioning)
   # MAJOR.MINOR.PATCH
   # MAJOR: Breaking changes
   # MINOR: New features (backward compatible)
   # PATCH: Bug fixes (backward compatible)
   
   # Example version updates
   # 1.2.3 -> 1.2.4 (patch)
   # 1.2.3 -> 1.3.0 (minor)
   # 1.2.3 -> 2.0.0 (major)
  1. Code Freeze and Branch Management
   # Create release branch from main
   git checkout main
   git pull origin main
   git checkout -b release/v1.2.3
   
   # Alternative: Use main branch directly for smaller releases
   # Ensure no new features are merged during release process
  1. Version Number Updates
   # Node.js projects
   npm version patch  # or minor, major
   
   # Python projects
   # Update version in setup.py, __init__.py, or pyproject.toml
   
   # Manual version update
   sed -i 's/"version": "1.2.2"/"version": "1.2.3"/' package.json
  1. Changelog Generation
   # CHANGELOG.md
   
   ## [1.2.3] - 2024-01-15
   
   ### Added
   - New user authentication system
   - Dark mode support for UI
   - API rate limiting functionality
   
   ### Changed
   - Improved database query performance
   - Updated user interface design
   - Enhanced error handling
   
   ### Fixed
   - Fixed memory leak in background tasks
   - Resolved issue with file upload validation
   - Fixed timezone handling in date calculations
   
   ### Security
   - Updated dependencies with security patches
   - Improved input validation and sanitization
  1. Documentation Updates
  1. Dependency Management
   # Update and audit dependencies
   npm audit fix
   npm update
   
   # Python
   pip-audit
   pip freeze > requirements.txt
   
   # Review security vulnerabilities
   npm audit
   snyk test
  1. Build and Artifact Generation
   # Clean build environment
   npm run clean
   rm -rf dist/ build/
   
   # Build production artifacts
   npm run build
   
   # Verify build artifacts
   ls -la dist/
   
   # Test built artifacts
   npm run test:build
  1. Testing and Quality Assurance
    # Run all tests
    npm test
    npm run test:integration
    npm run test:e2e
    
    # Check code coverage
    npm run test:coverage
    
    # Performance testing
    npm run test:performance
  1. Security and Compliance Verification
  1. Release Notes Preparation
    # Release Notes v1.2.3
    
    ## 🎉 What's New
    - **Dark Mode**: Users can now switch to dark mode in settings
    - **Enhanced Security**: Improved authentication with 2FA support
    - **Performance**: 40% faster page load times
    
    ## 🔧 Improvements
    - Better error messages for form validation
    - Improved mobile responsiveness
    - Enhanced accessibility features
    
    ## 🐛 Bug Fixes
    - Fixed issue with file downloads in Safari
    - Resolved memory leak in background tasks
    - Fixed timezone display issues
    
    ## 📚 Documentation
    - Updated API documentation
    - New user onboarding guide
    - Enhanced troubleshooting section
    
    ## 🔄 Migration Guide
    - No breaking changes in this release
    - Automatic database migrations included
    - See [Migration Guide](link) for details
  1. Release Tagging and Versioning
    # Create annotated tag
    git add .
    git commit -m "chore: prepare release v1.2.3"
    git tag -a v1.2.3 -m "Release version 1.2.3
    
    Features:
    - Dark mode support
    - Enhanced authentication
    
    Bug fixes:
    - Fixed file upload issues
    - Resolved memory leaks"
    
    # Push tag to remote
    git push origin v1.2.3
    git push origin release/v1.2.3
  1. Deployment Preparation
  1. Staging Environment Validation
    # Deploy to staging
    ./deploy-staging.sh v1.2.3
    
    # Run smoke tests
    npm run test:smoke:staging
    
    # Manual validation checklist
    # [ ] User login/logout
    # [ ] Core functionality
    # [ ] New features
    # [ ] Performance metrics
    # [ ] Security checks
  1. Production Deployment Planning
  1. Release Automation Setup
    # GitHub Actions Release Workflow
    name: Release
    
    on:
      push:
        tags:
          - 'v*'
    
    jobs:
      release:
        runs-on: ubuntu-latest
        steps:
          - uses: actions/checkout@v3
          - name: Setup Node.js
            uses: actions/setup-node@v3
            with:
              node-version: '18'
          
          - name: Install dependencies
            run: npm ci
          
          - name: Run tests
            run: npm test
          
          - name: Build
            run: npm run build
          
          - name: Create Release
            uses: actions/create-release@v1
            env:
              GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
            with:
              tag_name: ${{ github.ref }}
              release_name: Release ${{ github.ref }}
              draft: false
              prerelease: false
  1. Communication and Announcements
  1. Post-Release Monitoring
  1. Release Retrospective

Release Types and Considerations:

Patch Release (1.2.3 → 1.2.4):

Minor Release (1.2.3 → 1.3.0):

Major Release (1.2.3 → 2.0.0):

Hotfix Release:

# Emergency hotfix process
git checkout main
git pull origin main
git checkout -b hotfix/critical-bug-fix

# Make minimal fix
git add .
git commit -m "hotfix: fix critical security vulnerability"

# Fast-track testing and deployment
npm test
git tag -a v1.2.4-hotfix.1 -m "Hotfix for critical security issue"
git push origin hotfix/critical-bug-fix
git push origin v1.2.4-hotfix.1

Remember to: