This document outlines all steps required to release a new version of tinyjam.
- Homebrew: v1.2.0 (aryakaul/formulae/tinyjam)
- PyPI: v1.2.0
- Next release: v1.3.0
-
pyproject.toml- Updateversion = "X.Y.Z" -
src/tinyjam/__init__.py- Update__version__ = "X.Y.Z" -
CHANGELOG.md- Change[X.Y.Z] - Unreleasedto[X.Y.Z] - YYYY-MM-DDwith today's date
- Ensure all changes are committed on
devbranch - Review git status:
git status(should be clean) - Review recent commits:
git log --oneline -5
- Clean previous builds:
rm -rf build/ dist/ src/*.egg-info/ - Build package:
python -m build - Check package:
python -m twine check dist/* - Verify package contents:
tar -tzf dist/tinyjam-X.Y.Z.tar.gz | head -20
- Create annotated tag:
git tag -a vX.Y.Z -m "Release vX.Y.Z" - Verify tag:
git tag -l -n1 vX.Y.Z
- Push dev branch:
git push origin dev - Push tag:
git push origin vX.Y.Z - Verify on GitHub: https://github.com/aryakaul/nprtinyjam/releases
- Upload to PyPI:
python -m twine upload dist/* - Verify on PyPI: https://pypi.org/project/tinyjam/
- Test installation:
pip install --upgrade tinyjam - Verify installed version:
tinyjam --versionorpip show tinyjam
The Homebrew formula lives in a separate repository: aryakaul/homebrew-formulae
- Clone/update formulae repo:
git clone git@github.com:aryakaul/homebrew-formulae.git(orgit pullif already cloned) - Edit
Formula/tinyjam.rb:- Update
urlto point to new PyPI version tarball - Download new tarball:
curl -L https://files.pythonhosted.org/packages/.../tinyjam-X.Y.Z.tar.gz -o /tmp/tinyjam.tar.gz - Calculate SHA256:
shasum -a 256 /tmp/tinyjam.tar.gz - Update
sha256in formula with new hash - Update
version "X.Y.Z"if not auto-detected - Update any dependency changes if applicable
- Update
- Test formula locally:
brew install --build-from-source ./Formula/tinyjam.rb - Verify installation:
tinyjam --version - Commit changes:
git add Formula/tinyjam.rb && git commit -m "Bump tinyjam to vX.Y.Z" - Push to GitHub:
git push origin main - Wait for GitHub to update tap (~5 minutes)
- Test tap installation:
brew upgrade tinyjamorbrew reinstall tinyjam
- Switch to main:
git checkout main - Pull latest:
git pull origin main - Merge dev:
git merge dev - Push to GitHub:
git push origin main
- Switch back to dev:
git checkout dev - Add new section to
CHANGELOG.md:## [X.Y.Z+1] - Unreleased ### Added ### Changed ### Fixed
- Commit changelog:
git add CHANGELOG.md && git commit -m "Prepare changelog for next release" - Push to GitHub:
git push origin dev
- PyPI shows correct version: https://pypi.org/project/tinyjam/
- Homebrew shows correct version:
brew info tinyjam - GitHub release tag exists: https://github.com/aryakaul/nprtinyjam/releases
- Both installation methods work:
-
pip install tinyjaminstalls vX.Y.Z -
brew install aryakaul/formulae/tinyjaminstalls vX.Y.Z
-
Build fails:
- Check
pyproject.tomlsyntax - Ensure all dependencies are listed correctly
- Verify
src/tinyjam/__init__.pyhas correct imports
Twine upload fails:
- Check PyPI credentials:
~/.pypirc - Ensure version doesn't already exist on PyPI
- Verify package builds successfully:
python -m twine check dist/*
Homebrew formula fails:
- Verify SHA256 hash matches downloaded tarball
- Check that PyPI tarball is accessible
- Ensure all Python dependencies are listed as resources
- Test formula syntax:
brew install --build-from-source ./Formula/tinyjam.rb
Git tag conflicts:
- Check existing tags:
git tag -l - Delete local tag if needed:
git tag -d vX.Y.Z - Delete remote tag if needed:
git push origin :refs/tags/vX.Y.Z(use with caution!)