This document describes how to create a new release of c2i2o.
- Maintainer access to the GitHub repository
- PyPI account with permissions for c2i2o project
# Run the release preparation script
./scripts/prepare_release.sh 0.1.0Edit CHANGELOG.md:
Move items from [Unreleased] to new version section
Add release date
Ensure all changes are documented
git add pyproject.toml docs/source/conf.py CHANGELOG.md
git commit -m "chore: bump version to 0.1.0"
git push origin main git tag -a v0.1.0 -m "Release version 0.1.0"
git push origin v0.1.0This triggers the pre-release checks workflow.
Go to https://github.com/KIPAC/c2i2o/releases/new
Select tag: v0.1.0
Release title: v0.1.0 - Initial Release
Description: Copy from CHANGELOG.md
Check "Set as the latest release"
Click "Publish release"
This automatically triggers the PyPI publishing workflow!
# Wait a few minutes for GitHub Actions to complete
# Check PyPI
open https://pypi.org/project/c2i2o/
# Test installation
python -m venv test_release
source test_release/bin/activate
pip install c2i2o==0.1.0
python -c "import c2i2o; print(c2i2o.__version__)"
deactivate
rm -rf test_release # Bump to next dev version
./scripts/post_release.sh 0.1.0
# Commit
git add pyproject.toml CHANGELOG.md
git commit -m "chore: bump version to 0.2.0-dev"
git push origin mainUpdate documentation website
To test the release process without publishing to PyPI: Option 1: Manual Workflow Trigger
1. Go to https://github.com/KIPAC/c2i2o/actions/workflows/publish.yml
2. Click "Run workflow"
3. Select branch: main
4. Click "Run workflow"
This publishes to Test PyPI. Option 2: Create Pre-Release
1. Create a pre-release on GitHub with tag like v0.1.0-rc1
2. Mark as "pre-release"
2. Mark as "pre-release"
3. Manually trigger Test PyPI upload from Actions
# Create test environment
python -m venv testpypi_test
source testpypi_test/bin/activate
# Install from Test PyPI
pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple c2i2o
# Test
python -c "import c2i2o; print(c2i2o.__version__)"
# Clean up
deactivate
rm -rf testpypi_test