You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Publish AgentReady to PyPI with Automated Release Workflow
Overview
AgentReady should be published to PyPI to make it easily installable for users (pip install agentready). This issue tracks the manual publishing workflow (✅ implemented) and provides a cold-startable prompt for future automated integration with the existing semantic-release workflow.
Current State
✅ Implemented: Manual PyPI Publishing Workflow
A manual workflow has been created at .github/workflows/publish-pypi.yml that allows on-demand publishing to PyPI or TestPyPI.
Features:
Manual trigger via GitHub Actions UI (workflow_dispatch)
Optional version override (or use current version from pyproject.toml)
Dry run mode (publishes to TestPyPI for testing)
Production mode (publishes to PyPI)
Automatic GitHub release creation when publishing with version
Built-in validation with twine check
Security: Uses environment variables to prevent command injection
Usage:
Go to Actions → "Publish to PyPI" → "Run workflow"
Choose options:
Version: Leave empty to use current version, or specify (e.g., 1.2.0)
Dry run: Check to publish to TestPyPI first (recommended)
Click "Run workflow"
🔧 Required Setup
Before the workflow can be used, configure these secrets in GitHub repository settings:
Add to GitHub: Settings → Secrets → Actions → New repository secret
Name: PYPI_TOKEN
Register package name (first time only):
Run a dry run first to test
Then run production publish to claim the agentready package name
Future publishes will update the existing package
Future Enhancement: Automated PyPI Publishing
Currently, the semantic-release workflow (.releaserc.json + .github/workflows/release.yml) handles:
Automated version bumping based on conventional commits
CHANGELOG.md generation
GitHub releases
Git tagging
Goal: Integrate PyPI publishing into the automated release workflow so that every semantic release automatically publishes to PyPI.
🎯 Cold-Startable Prompt for Automated Integration
Use this prompt with Claude Code to implement automated PyPI publishing:
I need to integrate PyPI publishing into the existing semantic-release workflow for the AgentReady project.
CURRENT STATE:
- Semantic-release is configured in .releaserc.json and .github/workflows/release.yml
- Manual PyPI publishing workflow exists at .github/workflows/publish-pypi.yml
- GitHub secrets TEST_PYPI_TOKEN and PYPI_TOKEN are configured
REQUIREMENTS:
1. Integrate PyPI publishing into .github/workflows/release.yml
2. Publish to PyPI AFTER semantic-release creates the GitHub release
3. Use the version that semantic-release determined (from conventional commits)
4. Maintain existing semantic-release functionality (changelog, version bump, GitHub release)
5. Use the same security patterns as the manual workflow (environment variables, no command injection)
6. Handle failures gracefully (don't fail the entire release if PyPI publish fails)
7. Add a workflow summary showing PyPI publication status
IMPLEMENTATION STEPS:
1. Read .github/workflows/release.yml to understand current flow
2. Read .releaserc.json to understand semantic-release config
3. Add PyPI publishing step after semantic-release completes
4. Extract version from pyproject.toml that semantic-release just updated
5. Build and publish package using the same build tools as manual workflow
6. Test with a dry run first (semantic-release dry-run mode + TestPyPI)
TESTING CHECKLIST:
- [ ] Dry run mode works (semantic-release --dry-run + TestPyPI)
- [ ] Production mode works (real release + PyPI)
- [ ] Version from semantic-release is correctly used
- [ ] Existing semantic-release features still work (changelog, GitHub release)
- [ ] Failure handling works (PyPI failure doesn't break GitHub release)
- [ ] Workflow summary shows publication status
CONSTRAINTS:
- Do not modify semantic-release behavior (version bumping, changelog, GitHub releases)
- Reuse build/publish logic from .github/workflows/publish-pypi.yml
- Follow security best practices (environment variables for all inputs)
- Maintain backwards compatibility with existing release workflow
OUTPUT:
- Updated .github/workflows/release.yml with integrated PyPI publishing
- Documentation in CLAUDE.md about the automated publishing flow
- Testing instructions for validating the integration
Best Practices for PyPI Maintenance
Version Management
Let semantic-release control versions: Don't manually edit version in pyproject.toml
Use conventional commits: feat: triggers minor bump, fix: triggers patch, BREAKING CHANGE: triggers major
Version source of truth: After release, pyproject.toml version is authoritative
Publishing Workflow
Always dry run first: Test with TestPyPI before production
Verify package contents: Check twine check output for warnings
Test installation: After TestPyPI publish, try installing and running
Publish AgentReady to PyPI with Automated Release Workflow
Overview
AgentReady should be published to PyPI to make it easily installable for users (
pip install agentready). This issue tracks the manual publishing workflow (✅ implemented) and provides a cold-startable prompt for future automated integration with the existing semantic-release workflow.Current State
✅ Implemented: Manual PyPI Publishing Workflow
A manual workflow has been created at
.github/workflows/publish-pypi.ymlthat allows on-demand publishing to PyPI or TestPyPI.Features:
pyproject.toml)twine checkUsage:
1.2.0)🔧 Required Setup
Before the workflow can be used, configure these secrets in GitHub repository settings:
TEST_PYPI_TOKEN (for dry runs):
TEST_PYPI_TOKENPYPI_TOKEN (for production):
PYPI_TOKENRegister package name (first time only):
agentreadypackage nameFuture Enhancement: Automated PyPI Publishing
Currently, the semantic-release workflow (
.releaserc.json+.github/workflows/release.yml) handles:Goal: Integrate PyPI publishing into the automated release workflow so that every semantic release automatically publishes to PyPI.
🎯 Cold-Startable Prompt for Automated Integration
Use this prompt with Claude Code to implement automated PyPI publishing:
Best Practices for PyPI Maintenance
Version Management
pyproject.tomlfeat:triggers minor bump,fix:triggers patch,BREAKING CHANGE:triggers majorpyproject.tomlversion is authoritativePublishing Workflow
twine checkoutput for warningsSecurity
PYPI_TOKENandTEST_PYPI_TOKENyearlyPackage Metadata
The package metadata is defined in
pyproject.toml:agentreadyproject.descriptionproject.licenseproject.authorsproject.urls(homepage, repository, issues)project.classifiers(Python versions, license, topic)Review before first publish: Ensure all metadata in
pyproject.tomlis accurate and complete.Dependabot Integration
.github/dependabot.yml)fix:prefix, semantic-release will auto-publish patch versionRelease Cadence
mainwithfeat:orfix:triggers releaseAcceptance Criteria
Phase 1: Manual Publishing (✅ Complete)
pip install agentreadyPhase 2: Automated Publishing (Future)
Related Issues / PRs
.github/workflows/publish-pypi.yml: Manual publishing workflow (implemented).github/workflows/release.yml: Semantic-release workflow (to be enhanced)Notes for Implementation
When implementing automated integration:
.github/workflows/publish-pypi.ymlfor emergency publishes--dry-runmode + TestPyPI firstVersion extraction pattern (for automated workflow):
VERSION=$(python -c "import tomllib; print(tomllib.load(open('pyproject.toml', 'rb'))['project']['version'])")Build and publish pattern (reuse from manual workflow):
🤖 Generated with Claude Code