This document describes the release process for Claude Code Usage Monitor.
Releases are automatically triggered when changes are pushed to the main branch. The GitHub Actions workflow will:
- Extract the version from
pyproject.toml - Check if a git tag for this version already exists
- If not, it will:
- Create a new git tag
- Extract release notes from
CHANGELOG.md - Create a GitHub release
- Build and publish the package to PyPI
-
PyPI API Token: Must be configured as a GitHub secret named
PYPI_API_TOKEN- Generate at: https://pypi.org/manage/account/token/
- Add to repository secrets: Settings → Secrets and variables → Actions → New repository secret
-
Publishing Permissions: Ensure GitHub Actions has permissions to create releases
- Settings → Actions → General → Workflow permissions → Read and write permissions
If automated release fails or for special cases, follow these steps:
# Ensure you're on main branch with latest changes
git checkout main
git pull origin main
# Run tests and linting
uv sync --extra dev
uv run ruff check .
uv run ruff format --check .Edit pyproject.toml and update the version:
version = "1.0.9" # Update to your new versionAdd a new section at the top of CHANGELOG.md:
## [1.0.9] - 2025-06-21
### Added
- Description of new features
### Changed
- Description of changes
### Fixed
- Description of fixes
[1.0.9]: https://github.com/Maciek-roboblog/Claude-Code-Usage-Monitor/releases/tag/v1.0.9git add pyproject.toml CHANGELOG.md
git commit -m "Bump version to 1.0.9"
git push origin main# Create annotated tag
git tag -a v1.0.9 -m "Release v1.0.9"
# Push tag to GitHub
git push origin v1.0.9# Clean previous builds
rm -rf dist/
# Build with uv
uv build
# Verify build artifacts
ls -la dist/
# Should show:
# - claude_monitor-1.0.9-py3-none-any.whl
# - claude_monitor-1.0.9.tar.gz- Go to: https://github.com/Maciek-roboblog/Claude-Code-Usage-Monitor/releases/new
- Choose tag:
v1.0.9 - Release title:
Release v1.0.9 - Copy the relevant section from CHANGELOG.md to the description
- Attach the built artifacts from
dist/(optional) - Click "Publish release"
# Install twine if needed
uv tool install twine
# Upload to PyPI (will prompt for credentials)
uv tool run twine upload dist/*
# Or with API token
uv tool run twine upload dist/* --username __token__ --password <your-pypi-token>- Check PyPI: https://pypi.org/project/claude-monitor/
- Test installation:
# In a new environment uv tool install claude-monitor claude-monitor --version # Test all command aliases cmonitor --version ccm --version
We follow semantic versioning (SemVer):
- MAJOR.MINOR.PATCH (e.g., 1.0.9)
- MAJOR: Incompatible API changes
- MINOR: New functionality in a backward-compatible manner
- PATCH: Backward-compatible bug fixes
- Check Actions tab for error logs
- Common issues:
- Missing or invalid
PYPI_API_TOKEN - Version already exists on PyPI
- Malformed CHANGELOG.md
- Missing or invalid
- Authentication Error: Check your PyPI token
- Version Exists: Version numbers cannot be reused on PyPI
- Package Name Taken: The package name might be reserved
# Delete local tag
git tag -d v1.0.9
# Delete remote tag
git push --delete origin v1.0.9
# Recreate tag
git tag -a v1.0.9 -m "Release v1.0.9"
git push origin v1.0.9- All tests pass
- Code is properly formatted (ruff)
- Version updated in
pyproject.toml - CHANGELOG.md updated with release notes
- Changes committed and pushed to main
- Git tag created and pushed
- GitHub release created
- Package published to PyPI
- Installation tested in clean environment