This document outlines the comprehensive release process for TimeTracker, including automated workflows, manual steps, and best practices.
# 1. Create a complete release with changelog and GitHub release
./scripts/version-manager.sh release --version v1.2.3 --changelog --github-release
# 2. For pre-releases
./scripts/version-manager.sh release --version v1.2.3-rc.1 --pre-release --changelog --github-release- Prepare Release
- Create Tag
- Generate Changelog
- Create GitHub Release
- Verify Deployment
Before starting any release, ensure:
- All tests pass in CI/CD
- Database migrations tested and documented
- Docker images build successfully
- Documentation updated with new features
- Breaking changes documented (if any)
- Security vulnerabilities addressed
- Performance regressions checked
# Check current version and status
./scripts/version-manager.sh status
# Check for uncommitted changes
git status
# Ensure you're on main branch
git checkout main
git pull origin mainFollow Semantic Versioning:
- Major (v2.0.0): Breaking changes, major new features
- Minor (v1.1.0): New features, backward compatible
- Patch (v1.0.1): Bug fixes, backward compatible
- Pre-release (v1.0.0-rc.1): Release candidates, beta versions
# Get version suggestion
./scripts/version-manager.sh suggest# Create standard release
./scripts/version-manager.sh release \
--version v1.2.3 \
--message "Release 1.2.3 with new features and bug fixes" \
--changelog \
--github-releaseWhat this does:
- Creates and pushes git tag
- Generates changelog from commits
- Creates GitHub release with changelog
- Triggers Docker image build via GitHub Actions
# Create pre-release (RC, beta, alpha)
./scripts/version-manager.sh release \
--version v1.2.3-rc.1 \
--message "Release candidate for 1.2.3" \
--pre-release \
--changelog \
--github-release# Create hotfix from main branch
git checkout main
git pull origin main
# Apply hotfix
git cherry-pick <hotfix-commit>
# Create hotfix release
./scripts/version-manager.sh release \
--version v1.2.4 \
--message "Hotfix: Critical security update" \
--changelog \
--github-releaseIf you prefer manual control over the release process:
# Create annotated tag
git tag -a v1.2.3 -m "Release 1.2.3"
git push origin v1.2.3# Generate changelog
python scripts/generate-changelog.py v1.2.3 --output CHANGELOG.md
# Review and edit changelog if needed
nano CHANGELOG.md# Using GitHub CLI
gh release create v1.2.3 \
--title "TimeTracker v1.2.3" \
--notes-file CHANGELOG.md
# Or via GitHub web interface
# Go to: https://github.com/your-repo/releases/new- Check that Docker build workflow completed successfully
- Verify Docker images are published to GHCR
- Confirm all CI/CD checks passed
# Test the released image
docker run -d --name test-release -p 8080:8080 \
ghcr.io/drytrix/timetracker:v1.2.3
# Verify health
curl -f http://localhost:8080/_health
# Clean up
docker stop test-release && docker rm test-release- Update README.md version references
- Update deployment documentation
- Update Docker Compose examples
- Notify users of new release
The release process triggers several automated workflows:
Triggered by: GitHub release creation or manual dispatch
Steps:
- Validate Release - Ensures version format is correct
- Run Tests - Full test suite with database migrations
- Build & Push Docker - Multi-architecture Docker images
- Generate Changelog - Automated changelog generation
- Update Documentation - Version references in docs
- Notify Deployment - Summary and deployment instructions
Triggered by: Push to main/develop, pull requests
Steps:
- Lint & Format - Code quality checks
- Test Database Migrations - PostgreSQL & SQLite testing
- Test Docker Build - Container build and startup verification
- Security Scan - Dependency and code security scanning
- Version Management Validation - Version manager script testing
Triggered by: Changes to models or migrations
Steps:
- Validate Migrations - Schema consistency and rollback safety
- Test with Sample Data - Data integrity verification
- Generate Migration Report - Detailed migration analysis
# Delete tag locally and remotely
git tag -d v1.2.3
git push origin --delete v1.2.3
# Delete GitHub release
gh release delete v1.2.3
# Revert commits if needed
git revert <commit-hash># Create hotfix
git checkout v1.2.3
git cherry-pick <fix-commit>
# Create new patch release
./scripts/version-manager.sh release \
--version v1.2.4 \
--message "Hotfix for v1.2.3 issues" \
--changelog \
--github-release- Major releases: Every 6-12 months
- Minor releases: Every 1-2 months
- Patch releases: As needed for critical fixes
- Pre-releases: 1-2 weeks before major/minor releases
- Regular releases: Tuesday-Thursday (better for issue resolution)
- Hotfixes: Any day (emergency only)
- Pre-releases: Friday (allows weekend testing)
- Notify team before release
- Share release notes
- Coordinate deployment timing
- Plan post-release monitoring
- Update release notes on GitHub
- Update documentation website
- Notify via social media/newsletters
- Verify Docker Hub description was auto-updated by the release workflow (
docker/hub-README.mdβ hub.docker.com/r/drytrix/timetracker) - Verify GitHub Release includes
docker-compose.nas.ymlanddocker-compose.production.ymlartifacts - Confirm Distribution guide links are current (Portainer template URL, Unraid XML paths)
Every release must pass:
- All automated tests (unit, integration, E2E)
- Database migration tests (up and down)
- Docker build verification (multi-architecture)
- Security scans (dependencies and code)
- Performance benchmarks (no significant regression)
- Documentation review (accuracy and completeness)
Issue: Docker build fails
# Check Docker build locally
docker build -t test-build .
# Check workflow logs in GitHub ActionsIssue: Migration validation fails
# Test migrations locally
flask db upgrade
flask db downgrade
flask db upgradeIssue: Version tag already exists
# Check existing tags
git tag -l
# Delete if needed
git tag -d v1.2.3
git push origin --delete v1.2.3- Git - Version control
- GitHub CLI (
gh) - GitHub release management - Docker - Container testing
- Python 3.11+ - Script execution
- Flask - Database migration testing
# Install GitHub CLI
# macOS: brew install gh
# Ubuntu: sudo apt install gh
# Windows: winget install GitHub.CLI
# Authenticate
gh auth login
# Install Python dependencies
pip install -r requirements.txtTrack release metrics:
- Release frequency - How often releases are made
- Lead time - Time from commit to release
- Failure rate - Percentage of failed releases
- Recovery time - Time to fix broken releases
- User adoption - Docker pull statistics
Regular review of:
- Release process efficiency
- Automation opportunities
- Quality gate effectiveness
- User feedback incorporation
- Tool and workflow updates
For release process issues:
- Check this documentation
- Review GitHub Actions logs
- Test locally with provided commands
- Create issue with detailed error information