This document describes how to release a new version of mcp-gigapi to PyPI.
- PyPI Account: You need a PyPI account with access to the
mcp-gigapipackage - GitHub Repository Access: You need push access to the repository
- PyPI API Token: Create an API token in your PyPI account settings
- Go to PyPI Account Settings
- Create a new API token with scope "Entire account (all projects)"
- Copy the token (it starts with
pypi-) - Add it to your GitHub repository secrets:
- Go to your repository settings
- Navigate to "Secrets and variables" → "Actions"
- Add a new repository secret named
PYPI_API_TOKEN - Paste your PyPI API token as the value
Update the version in pyproject.toml:
[project]
version = "0.1.1" # or whatever the new version isAdd release notes to the README or create a CHANGELOG.md file documenting the changes.
-
Commit your changes:
git add . git commit -m "Release v0.1.1" git push origin main
-
Create a new release on GitHub:
- Go to the repository on GitHub
- Click "Releases" in the right sidebar
- Click "Create a new release"
- Choose a tag (e.g.,
v0.1.1) - Add a release title (e.g., "Release v0.1.1")
- Add release notes describing the changes
- Click "Publish release"
Once you publish the release, the GitHub Actions workflow will automatically:
- Run all tests on multiple Python versions
- Build the package
- Publish to PyPI
You can monitor the progress in the "Actions" tab of your repository.
After the workflow completes successfully:
- Check PyPI: https://pypi.org/project/mcp-gigapi/
- Verify the new version is available
- Test installation:
uv run --with mcp-gigapi --python 3.11 mcp-gigapi --help
If you need to publish manually:
# Install build tools
uv sync --all-extras --dev
# Build the package
uv build
# Publish to PyPI
uv run python -m twine upload dist/*Follow Semantic Versioning:
- MAJOR.MINOR.PATCH
- MAJOR: Breaking changes
- MINOR: New features, backward compatible
- PATCH: Bug fixes, backward compatible
- Authentication Failed: Check that your
PYPI_API_TOKENsecret is correctly set - Version Already Exists: PyPI doesn't allow overwriting versions. Increment the version number
- Build Failures: Check the GitHub Actions logs for specific error messages
If you need to rollback a release:
-
PyPI: PyPI doesn't support deleting packages, but you can yank a release:
uv run python -m twine delete mcp-gigapi 0.1.1
-
GitHub: Delete the release tag and release on GitHub
- Never commit API tokens to the repository
- Use repository secrets for sensitive data
- Regularly rotate your PyPI API tokens
- Review the release before publishing