This document describes the release workflow for DATAMIMIC. We use a streamlined approach where:
- Development happens on the
development
branch - Releases are tagged on
development
- Main branch serves as a clean release history
development
: Active development branch, source of truthmain
: Clean release history, one commit per releasefeature/*
: Feature branches for ongoing work
- Feature Development
# Create feature branch from development
git checkout development
git pull origin development
git checkout -b feature/DAT-XXX-description
# Regular commits during development
git commit -m "feat: your changes"
git push origin feature/DAT-XXX-description
# Keep in sync with development
git fetch origin development
git rebase origin/development
- Feature Completion
# Ensure tests pass
pytest
# Merge to development (via PR)
git checkout development
git merge --no-ff feature/DAT-XXX-description
git push origin development
- Prepare Release on Development
# Ensure development is clean
git checkout development
git pull origin development
pytest
# Create release tag
git tag -a X.Y.Z -m "Release version X.Y.Z"
git push origin development --tags
- Update Main Branch
# Squash merge release to main
git checkout main
git merge --squash X.Y.Z
git commit -m "release: X.Y.Z"
git push origin main
We follow semantic versioning (MAJOR.MINOR.PATCH):
- MAJOR: Breaking changes
- MINOR: New features, backward compatible
- PATCH: Bug fixes, backward compatible
-
Clean History
- Main branch maintains one commit per release
- All development details preserved in development branch
- Tags created on development branch first
-
CI/CD
- Primary CI/CD runs on development branch
- Main branch is for historical record only
-
Rollback Process
# To rollback to a previous release
git checkout main
git reset --hard X.Y.Z
git push --force-with-lease origin main
- Create Hotfix
# Create hotfix branch from latest release tag
git checkout -b hotfix/DAT-XXX-description X.Y.Z
# Make fixes and commit
git commit -m "fix: critical issue"
- Release Hotfix
# Tag on development
git checkout development
git merge --no-ff hotfix/DAT-XXX-description
git tag -a X.Y.Z+1 -m "Hotfix release X.Y.Z+1"
git push origin development --tags
# Update main
git checkout main
git merge --squash X.Y.Z+1
git commit -m "release: X.Y.Z+1"
git push origin main
- Always create release tags on development first
- Keep main branch clean with only release commits
- Use
--squash
when merging to main - Maintain detailed release notes for each version
- Run full test suite before creating release tags
- All tests passing on development
- Version numbers updated in relevant files
- Documentation updated
- Release notes prepared
- Release tag created on development
- Release squashed and merged to main
- Release notes published on GitHub