Release Management
This document describes the automated release management process for promoting changes from development to production.
Overview
HyperStudy uses an automated workflow to manage releases and promotions from the development branch to the production branch. This system ensures consistent versioning, maintains comprehensive changelogs, and automates the deployment process.
Branch Strategy
development: Active development branch where new features and fixes are mergedproduction: Stable production branch that triggers automatic deploymentsmain: Default branch (currently mirrors production for compatibility)
Automated Promotion Workflow
Manual Promotion
Trigger a promotion on-demand with version control:
# Promote with patch version bump (1.0.0 → 1.0.1)
gh workflow run promote-to-production.yml -f release_type=patch
# Promote with minor version bump (1.0.0 → 1.1.0)
gh workflow run promote-to-production.yml -f release_type=minor
# Promote with major version bump (1.0.0 → 2.0.0)
gh workflow run promote-to-production.yml -f release_type=major
# Use a custom version
gh workflow run promote-to-production.yml -f custom_version=2.5.0
Scheduled Promotion
The system automatically runs a promotion workflow every Monday at 9 AM UTC. This:
- Checks for changes between development and production
- Creates a promotion PR if changes exist
- Auto-merges if all CI checks pass
- Creates a release and triggers deployment
Promotion Process
- Change Detection: Checks for commits between production and development
- Changelog Generation: Creates categorized changelog from commit messages
- PR Creation: Opens a pull request with:
- Summary of all changes
- Updated CHANGELOG.md file
- Version information
- Pre-merge checklist
- CI Validation: Waits for all CI checks to pass
- Merge:
- Manual trigger: Waits for manual approval and merge
- Scheduled trigger: Auto-merges if checks pass
- Release Creation: Creates GitHub release with version tag
- Deployment: Triggers automatic deployment to production
Changelog Management
Automatic Changelog Generation
The system generates changelogs by analyzing commit messages and categorizing them:
- BREAKING CHANGES: Breaking changes
- Features: New features (
feat:commits) - Bug Fixes: Bug fixes (
fix:commits) - Performance: Performance improvements (
perf:commits) - Documentation: Documentation updates (
docs:commits) - Tests: Test additions/updates (
test:commits) - Maintenance: Build/CI changes (
chore:,ci:,build:commits)
Manual Changelog Generation
Generate a changelog locally for review:
# Generate changelog between branches
node scripts/generate-changelog.js origin/production origin/development
# Save changelog to file
node scripts/generate-changelog.js origin/production origin/development --save
Commit Message Convention
Use conventional commit format for better changelog generation:
feat:- New featurefix:- Bug fixperf:- Performance improvementdocs:- Documentation changetest:- Test addition or updaterefactor:- Code refactoringchore:- Maintenance taskci:- CI/CD changesbuild:- Build system changes
Examples:
feat: add user authentication system
fix: resolve memory leak in video player
perf: optimize database queries for faster loading
docs: update API documentation
Version Management
Semantic Versioning
The project follows semantic versioning (MAJOR.MINOR.PATCH):
- MAJOR: Breaking changes
- MINOR: New features (backwards compatible)
- PATCH: Bug fixes (backwards compatible)
Version Tags
- All releases are tagged with version numbers (e.g.,
v1.2.3) - Tags are created on the production branch
- Each tag triggers a GitHub release
Pull Request Template
When creating PRs, use the provided template which includes:
- Description: Brief summary of changes
- Type of Change: Category selection
- Related Issues: Link to relevant issues
- Testing: Verification steps taken
- Checklist: Pre-merge validations
- Changelog Entry: User-facing change description
The changelog entry should follow the format:
type: description
Release Notes
Release notes are automatically generated and include:
- Categorized list of changes
- Pull request references
- Contributor list
- Dependency updates
- Installation instructions
- Full changelog link
Best Practices
- Commit Messages: Use conventional commit format consistently
- PR Descriptions: Fill out the PR template completely
- Testing: Ensure all tests pass before merging to development
- Review: Review promotion PRs before merging (for manual triggers)
- Monitoring: Check deployment status after promotion
Troubleshooting
Failed CI Checks
If CI checks fail during promotion:
- The workflow will stop and require manual intervention
- Fix the issues in the development branch
- Re-run the promotion workflow
Merge Conflicts
If conflicts occur:
- Resolve conflicts in the development branch
- Ensure development is up-to-date with production
- Re-trigger the promotion workflow
Manual Intervention Required
For manual promotions:
- Review the created PR
- Ensure all checks pass
- Manually merge when ready
- The workflow will automatically continue after merge
Workflow Files
.github/workflows/promote-to-production.yml: Main promotion workflow.github/workflows/create-release-notes.yml: Release notes generationscripts/generate-changelog.js: Changelog generation script.github/pull_request_template.md: PR template for better commit messages