This document describes how to release new versions of ZeroBuffer packages.
- NUGET_API_KEY - API key for publishing to NuGet.org
- PYPI_API_TOKEN - API token for publishing to PyPI (use token as username)
To add these secrets:
- Go to the repository Settings → Secrets and variables → Actions
- Add the secrets with the appropriate values
-
Tag the release:
# For all packages git tag -a v1.0.0 -m "Release version 1.0.0" # For specific package only git tag -a csharp-v1.0.0 -m "Release C# version 1.0.0" git tag -a python-v1.0.0 -m "Release Python version 1.0.0" # Push tags git push origin --tags
-
The GitHub Actions workflows will automatically:
- Build the packages
- Run all tests
- Publish to NuGet/PyPI if tests pass
You can also trigger releases manually from GitHub Actions:
- Go to Actions tab in the repository
- Select the appropriate workflow:
- "Publish to NuGet" for C#
- "Publish to PyPI" for Python
- Click "Run workflow"
- Enter the version number (e.g., 1.0.0)
- Click "Run workflow"
We follow Semantic Versioning (SemVer):
- MAJOR.MINOR.PATCH (e.g., 1.0.0)
- MAJOR: Breaking API changes
- MINOR: New features (backwards compatible)
- PATCH: Bug fixes
Before creating a release:
-
Update version numbers:
- C#: Update version in workflow (it will override the project version)
- Python: Version is set by the workflow
-
Update documentation:
- Ensure README.md is up to date
- Update any API documentation
- Add release notes
-
Test locally:
# C# cd csharp dotnet test dotnet pack # Python cd python pytest python -m build
-
Check package contents:
# C# dotnet pack --configuration Release # Check the .nupkg file contents # Python python -m build twine check dist/*
- Package ID:
ZeroBuffer - Supports: .NET 6.0+
- Platform: Cross-platform (Windows, Linux, macOS)
- Package name:
zerobuffer - Supports: Python 3.8+
- Platform-specific dependencies are handled via extras
- Check the GitHub Actions logs
- Ensure all tests pass locally
- Verify version numbers are correct
- Verify API keys/tokens are correct
- Check if the version already exists (use --skip-duplicate)
- Ensure package metadata is valid
After a successful release:
- Create a GitHub Release with release notes
- Update any dependent projects
- Announce the release if appropriate