This document guides you through creating your first release of Jenkins AI Optimizer on PyPI.
- Updated author email in
pyproject.tomltokaradhub@gmail.com - Fixed Issues URL typo (JkaradHub → karadHub)
- Updated license format to SPDX identifier (GPL-3.0-or-later)
- Created comprehensive
CHANGELOG.mdwith all v1.0.1 features - Built package locally and verified with
twine check - Created GitHub workflow
.github/workflows/publish.yml
-
Create PyPI account: https://pypi.org/account/register/
- Use email:
karadhub@gmail.com - Enable 2FA (required for publishing)
- Use email:
-
Create Test PyPI account: https://test.pypi.org/account/register/
- Same email for consistency
- Enable 2FA
For Test PyPI (do this first):
- Go to: https://test.pypi.org/manage/account/publishing/
- Click "Add a new pending publisher"
- Fill in:
- PyPI Project Name:
jenkins-ai-optimizer - Owner:
karadHub - Repository name:
jenkins-ai-optimizer - Workflow filename:
publish.yml - Environment name:
test-pypi
- PyPI Project Name:
- Click "Add"
For Production PyPI (do after testing):
- Go to: https://pypi.org/manage/account/publishing/
- Click "Add a new pending publisher"
- Fill in:
- PyPI Project Name:
jenkins-ai-optimizer - Owner:
karadHub - Repository name:
jenkins-ai-optimizer - Workflow filename:
publish.yml - Environment name:
pypi
- PyPI Project Name:
- Click "Add"
- Go to your repository: https://github.com/karadHub/jenkins-ai-optimizer
- Click Settings → Environments
- Click "New environment"
- Create environment named:
test-pypi - (Optional) Add protection rules:
- ✓ Required reviewers (yourself)
- ✓ Wait timer (0 minutes)
- Click "Configure environment"
- Repeat for environment named:
pypi
# Stage all changes
git add .
# Commit the release preparation
git commit -m "chore: prepare for v1.0.1 release
- Updated author email and fixed URLs in pyproject.toml
- Created CHANGELOG.md with comprehensive feature list
- Added GitHub workflow for PyPI publishing
- Fixed license format to SPDX identifier
- Verified package builds successfully"
# Push to GitHub
git push origin main- Go to: https://github.com/karadHub/jenkins-ai-optimizer/actions
- Click "Publish to PyPI" workflow
- Click "Run workflow"
- ✓ Check "Publish to Test PyPI instead of PyPI"
- Click "Run workflow" button
# Build the package (already done)
python -m build
# Upload to Test PyPI manually
python -m twine upload --repository testpypi dist/*
# You'll need to create an API token at:
# https://test.pypi.org/manage/account/token/# Install from Test PyPI
pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple jenkins-ai-optimizer
# Test the installation
jenkins_mcp_enterprise --help
# Uninstall after testing
pip uninstall jenkins-ai-optimizer -y- Go to: https://github.com/karadHub/jenkins-ai-optimizer/releases
- Click "Draft a new release"
- Fill in:
- Choose a tag:
v1.0.1(create new tag on publish) - Target:
main - Release title:
v1.0.1 - Initial Public Release - Description: Copy from CHANGELOG.md (the v1.0.1 section)
- Choose a tag:
- ✓ Check "Set as the latest release"
- Click "Publish release"
This will automatically:
- Trigger the GitHub workflow
- Build the package
- Publish to PyPI
- Make it available via
pip install jenkins-ai-optimizer
-
Check PyPI page: https://pypi.org/project/jenkins-ai-optimizer/
- Verify version shows as 1.0.1
- Check that README displays correctly
- Verify all metadata (author, license, links)
-
Test installation from PyPI:
# In a fresh environment pip install jenkins-ai-optimizer # Verify installation jenkins_mcp_enterprise --version jenkins_mcp_enterprise --help
-
Monitor downloads: PyPI provides statistics at:
-
Update README badge (optional): Add to README.md after release:
[](https://badge.fury.io/py/jenkins-ai-optimizer) [](https://pepy.tech/project/jenkins-ai-optimizer)
After successful release, consider:
- GitHub Discussions: Announce in your repo discussions
- Social Media: Share on Twitter/LinkedIn with #DevOps #Jenkins #AI #MCP tags
- Reddit: r/devops, r/Python, r/opensource
- Discord/Slack: Share in relevant DevOps communities
Package Details:
- Name: jenkins-ai-optimizer
- Version: 1.0.1
- License: GPL-3.0-or-later
- Author: Vaibhav Karad (karadhub@gmail.com)
- Repository: https://github.com/karadHub/jenkins-ai-optimizer
- PyPI: https://pypi.org/project/jenkins-ai-optimizer/
Installation Command:
pip install jenkins-ai-optimizerCommand Line Usage:
jenkins_mcp_enterprise --config config/mcp-config.yml --transport stdio- Start working on v1.1.0 features
- Set up GitHub issue templates
- Create contributing guidelines
- Add more comprehensive examples
- Consider creating a documentation site (GitHub Pages, Read the Docs)
- Version Immutability: Once published to PyPI, you cannot republish the same version
- Delete Limitation: You can only delete releases within 24 hours
- Test First: Always test on Test PyPI before production
- Semantic Versioning: Follow semver for version numbers (MAJOR.MINOR.PATCH)
- You can't republish the same version
- Increment version in pyproject.toml and rebuild
- Verify environment names match exactly (case-sensitive)
- Ensure workflow is pushed to default branch (main)
- Check that you're creating release, not just tags
- Check Python version compatibility
- Verify all files are committed to git
- Review workflow logs in GitHub Actions
Good luck with your first release! 🚀
If you encounter any issues, check the GitHub Actions logs or PyPI project dashboard for details.