This document describes the release management process for DevAIFlow (daf tool).
💡 Recommended: Use the automated
/releaseskill instead of following these manual steps.This document is maintained as a reference for:
- Understanding the release process details
- Troubleshooting release issues
- Custom scenarios not covered by automation
IMPORTANT: This repository uses a fork-based workflow with strict release authorization.
Fork-Based Workflow:
-
Maintainers (@itdove): Write/Admin access
- Can push tags
- Can create releases
- Can use
/releaseskill - Handle PyPI publications
-
Contributors: Must use forks
- Cannot push tags
- All changes via PRs
- See CONTRIBUTING.md
Currently authorized to create production releases:
- @itdove (Repository Owner)
DO NOT create release tags.
Instead:
- Fork the repository
- Submit PRs with your changes
- Update CHANGELOG.md in your PR
- Maintainers will handle releases
Use the /release skill for automated release management:
/release minor # 2.1.0 -> 2.2.0
/release patch # 2.2.0 -> 2.2.1
/release major # 2.0.0 -> 3.0.0
/release test # 2.2.0-dev -> 2.2.0-test1The .github/workflows/tag-monitor.yml workflow:
- Logs all tag creation events
- Verifies authorization for production tags
- Creates security issues for unauthorized attempts
- Provides audit trail for all releases
- Release Authorization Policy
- Version Numbering
- Branch Strategy
- Release Workflow
- Hotfix Workflow
- Release Checklist
- Version Infrastructure
We follow Semantic Versioning (MAJOR.MINOR.PATCH):
- MAJOR: Breaking changes (incompatible API changes)
- MINOR: New features (backward compatible)
- PATCH: Bug fixes (backward compatible)
- Development: X.Y.Z-dev (on main branch)
Examples:
1.0.0- First stable release1.1.0- Added new features1.1.1- Bug fixes only1.2.0-dev- Development version on main branch
- main: Active development branch (latest features, version X.Y.0-dev)
- release/X.Y: Release branches (e.g., release/1.0, release/1.1)
- hotfix/X.Y.Z: Hotfix branches for critical fixes to released versions
- vX.Y.Z: Git tags for each release (e.g., v1.0.0, v1.0.1, v1.1.0)
main (v1.1.0-dev)
|
|--- release/1.0 (created from main when ready for v1.0.0)
| |
| |--- v1.0.0 (tagged after testing)
| |
| |--- hotfix/1.0.1 (created from v1.0.0 tag)
| |
| |--- v1.0.1 (tagged after fix)
| |
| (merged back to release/1.0 and cherry-picked to main)
|
|--- release/1.1 (created from main when ready for v1.1.0)
|
|--- v1.1.0 (tagged after testing)
- All features for the release are merged to
main - All tests pass on
main - CHANGELOG.md is up-to-date in the Unreleased section
- JIRA epic for the release is complete
# Ensure main is up-to-date
git checkout main
git pull origin main
# Create release branch (e.g., release/1.0)
git checkout -b release/1.0 main
# Push release branch
git push -u origin release/1.0Update version in devflow/init.py:
__version__ = "1.0.0" # Remove -dev suffixUpdate version in pyproject.toml:
[project]
name = "devaiflow"
version = "1.0.0" # Remove -dev suffixCommit the version bump:
git commit -m "$(cat <<'EOF'
chore: bump version to 1.0.0 for release
Prepare for v1.0.0 release:
- Update version in devflow/__init__.py
- Update version in pyproject.toml
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
EOF
)"Move Unreleased section entries to a new version section:
## [1.0.0] - 2025-01-15
### Added
- Initial stable release
- [List of features added]
### Changed
- [List of changes]
### Fixed
- [List of bug fixes]
[1.0.0]: https://github.com/itdove/devaiflow/-/tags/v1.0.0Commit the changelog:
git commit -m "$(cat <<'EOF'
docs: update CHANGELOG.md for v1.0.0 release
Move unreleased items to v1.0.0 section with release date.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
EOF
)"# Run full test suite
pytest
# Run integration tests
cd integration-tests && ./test_collaboration_workflow.sh
cd integration-tests && ./test_jira_green_path.sh
# Verify version command
daf --version # Should show: daf, version 1.0.0
# Test installation in clean environment
python -m venv /tmp/test-daf-install
source /tmp/test-daf-install/bin/activate
pip install .
daf --version
deactivate
rm -rf /tmp/test-daf-install# Create annotated tag
git tag -a v1.0.0 -m "Release version 1.0.0
See CHANGELOG.md for details.
"
# Push tag to remote
git push origin v1.0.0Create a release on GitLab using the web UI or glab CLI:
# Get changelog content for this version
CHANGELOG_CONTENT=$(sed -n '/## \[1.0.0\]/,/## \[/p' CHANGELOG.md | head -n -1)
# Create GitLab release
glab release create v1.0.0 \
--name "DevAIFlow v1.0.0" \
--notes "$CHANGELOG_CONTENT"Or use the GitLab web UI:
- Go to Repository > Tags
- Find v1.0.0 tag
- Click "Create release"
- Add release notes from CHANGELOG.md
- Link to JIRA epic
- Publish release
# Switch to main
git checkout main
# Merge release branch
git merge release/1.0 --no-ff -m "Merge release/1.0 into main"
# Bump version to next dev cycle
# Update devflow/__init__.py to "1.1.0-dev"
# Update setup.py to "1.1.0-dev"
git commit -m "$(cat <<'EOF'
chore: bump version to 1.1.0-dev
Begin development cycle for v1.1.0.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
EOF
)"
# Push to remote
git push origin mainNote: PyPI publishing is fully documented in docs/publishing-to-pypi.md.
See the guide for complete instructions on:
- Generating and securing PyPI API tokens
- Building distribution packages
- Publishing to Test PyPI and PyPI
- Verifying installation
- Troubleshooting common issues
Use hotfix branches for:
- Critical bugs in production releases
- Security vulnerabilities
- Data corruption issues
- Severe performance problems
Do NOT use hotfixes for:
- Minor bugs (wait for next minor release)
- New features
- Refactoring
# Checkout the release tag that needs the fix
git checkout -b hotfix/1.0.1 v1.0.0
# Alternatively, branch from the release branch
git checkout -b hotfix/1.0.1 release/1.0Make the necessary code changes to fix the critical bug.
# Make your fixes
# Write tests to verify the fix
pytest
# Commit the fix
git commit -m "$(cat <<'EOF'
fix: critical bug in backup operation
Fixes timeout issue when creating large backups.
Fixes: PROJ-12345
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
EOF
)"Update to patch version in devflow/init.py:
__version__ = "1.0.1"Update version in pyproject.toml:
[project]
version = "1.0.1"Add a new section for the hotfix:
## [1.0.1] - 2025-01-20
### Fixed
- Critical timeout issue in backup operation (PROJ-12345)
[1.0.1]: https://github.com/itdove/devaiflow/-/tags/v1.0.1# Create tag
git tag -a v1.0.1 -m "Hotfix release 1.0.1
Critical fix for backup timeout issue.
"
# Push tag
git push origin v1.0.1
# Create GitLab release
glab release create v1.0.1 \
--name "DevAIFlow v1.0.1 (Hotfix)" \
--notes "## Critical Bug Fixes\n\n- Fixed timeout issue in backup operation\n\nSee CHANGELOG.md for details."# Merge hotfix to release branch
git checkout release/1.0
git merge hotfix/1.0.1 --no-ff
git push origin release/1.0
# Cherry-pick the fix to main (NOT merge the version bumps)
git checkout main
git cherry-pick <commit-sha-of-the-fix> # Only the fix commit, not version bumps
git push origin main
# Delete hotfix branch
git branch -d hotfix/1.0.1
git push origin --delete hotfix/1.0.1Before publishing to production PyPI, it's recommended to test the release workflow using TestPyPI. This helps catch packaging issues early without affecting the production package.
- TestPyPI Account: Create account at https://test.pypi.org/account/register/
- Trusted Publishing Setup: Configure at https://test.pypi.org/manage/account/publishing/
- PyPI Project Name:
devaiflow - Owner:
itdove - Repository name:
devaiflow - Workflow name:
publish-test.yml - Environment name:
testpypi
- PyPI Project Name:
- GitHub Environment: Create environment
testpypiat https://github.com/itdove/devaiflow/settings/environments
- TestPyPI:
v2.2.0-test,v2.2.0-test1,v2.2.0-test2 - Production PyPI:
v2.2.0,v2.2.1,v2.3.0
The -test suffix ensures the workflow only triggers for test releases.
# Create test release branch from main
git checkout -b release-2.2-test mainUpdate version in devflow/init.py:
__version__ = "2.2.0-test1"Update version in pyproject.toml:
[project]
version = "2.2.0-test1"# Commit version changes
git add pyproject.toml devflow/__init__.py
git commit -m "chore: bump version to 2.2.0-test1 for TestPyPI"
# Create and push test tag
git tag -a v2.2.0-test1 -m "Test release for TestPyPI"
git push origin v2.2.0-test1The publish-test.yml workflow will automatically trigger:
- Go to https://github.com/itdove/devaiflow/actions
- Find the "Publish to TestPyPI" workflow run
- Monitor the build and publish steps
Visit https://test.pypi.org/project/devaiflow/ to verify:
- Package uploaded successfully
- Version number is correct
- README renders properly
- Metadata is accurate
# Create test environment
python -m venv /tmp/test-devaiflow
source /tmp/test-devaiflow/bin/activate
# Install from TestPyPI
pip install --index-url https://test.pypi.org/simple/ \
--extra-index-url https://pypi.org/simple/ \
devaiflow==2.2.0-test1
# Verify installation
daf --version
daf --help
# Cleanup
deactivate
rm -rf /tmp/test-devaiflowIf testing is successful:
- Delete the test branch:
git branch -D release-2.2-test - Follow the regular release workflow with production version (v2.2.0)
- Production workflow (
publish.yml) will publish to production PyPI
You can also manually trigger the TestPyPI workflow:
- Go to https://github.com/itdove/devaiflow/actions/workflows/publish-test.yml
- Click "Run workflow"
- Select the branch with test version
- Click "Run workflow" button
The TestPyPI workflow (.github/workflows/publish-test.yml):
- Triggers on tags matching
v*-test* - Uses Trusted Publishing (no API tokens needed)
- Publishes to https://test.pypi.org/
- Supports
skip-existingfor re-running tests
Use this checklist for each release:
- All planned features merged to
main - All tests pass (
pytest) - Integration tests pass
- CHANGELOG.md updated with all changes
- Version bump PR reviewed and approved
- JIRA epic marked as complete
- (Optional) Test release on TestPyPI with
-testsuffix tag
- Create release branch (
release/X.Y) - Update version in
devflow/__init__.py(remove-dev) - Update version in
setup.py(remove-dev) - Update CHANGELOG.md (move Unreleased to version section)
- Run full test suite
- Test installation in clean environment
- Create and push git tag (
vX.Y.Z)
- Create GitLab release from tag
- Add release notes from CHANGELOG.md
- Link to JIRA epic
- Verify release artifacts
- Merge release branch back to
main - Bump version to next dev cycle (
X.Y+1.0-dev) - Update AGENTS.md "Completed Enhancements" section
- Announce release (if applicable)
- Publish to PyPI (see docs/publishing-to-pypi.md)
- Create hotfix branch from release tag
- Fix bug and add tests
- Update version to patch level
- Update CHANGELOG.md
- Create and push tag
- Merge back to release branch
- Cherry-pick fix to
main
Version number is stored in two locations:
-
devflow/init.py - Single source of truth for runtime
__version__ = "1.0.0"
-
pyproject.toml - Package metadata (PEP 621)
[project] version = "1.0.0"
Important: Always keep these two files in sync during version bumps.
Note: The project uses pyproject.toml (PEP 517/518/621) for package configuration. The setup.py file is kept for backward compatibility but contains no version information.
Users can check the version using:
daf --version
# Output: daf, version 1.0.0This is implemented in devflow/cli/main.py:
@click.version_option(version=__version__)Development versions on main branch always have the -dev suffix:
1.0.0-dev- Developing towards v1.0.01.1.0-dev- Developing towards v1.1.0
This helps distinguish development builds from stable releases.
For questions about the release process:
- Review this document
- Check CHANGELOG.md for examples
- See AGENTS.md for project-specific guidelines