Skip to content

Add PyPI packaging (cleo-pm) and automated GitHub Releases#2

Merged
Surt merged 1 commit into
mainfrom
devin/1779649351-pypi-github-releases
May 24, 2026
Merged

Add PyPI packaging (cleo-pm) and automated GitHub Releases#2
Surt merged 1 commit into
mainfrom
devin/1779649351-pypi-github-releases

Conversation

@devin-ai-integration
Copy link
Copy Markdown
Contributor

Summary

Adds automatic publishing so Cleo reaches more users via pip install cleo-pm and GitHub Releases.

What's included:

  • pyproject.toml — Declares cleo-pm as a PyPI package using setuptools + setuptools-scm (version derived automatically from git tags like v0.2.1). Console entry point cleo maps to tools/cleo.py:main_cli().
  • tools/__init__.py — Makes tools/ a proper Python package so setuptools can map it as cleo_pm.
  • tools/cleo.py — Added main_cli() wrapper for the console_scripts entry point.
  • .github/workflows/release.yml — On v* tag push: runs the full test matrix, builds sdist + wheel, publishes to PyPI via trusted publishing (OIDC, no API token needed), and creates a GitHub Release with auto-generated notes + attached dist files.
  • README.md — Added pip install cleo-pm as the primary install method + PyPI badge.

After merging, you need to do one setup step on PyPI:

  1. Go to https://pypi.org/manage/account/publishing/ (create an account if needed)
  2. Add a "pending publisher" for package cleo-pm, owner Surt, repo cleo, workflow release.yml, environment pypi
  3. Also create a GitHub environment called pypi at https://github.com/Surt/cleo/settings/environments

Then git tag v0.3.0 && git push origin v0.3.0 will automatically publish to PyPI and create a GitHub Release.

Review & Testing Checklist for Human

  • Verify the PyPI package name cleo-pm is available at https://pypi.org/project/cleo-pm/ — if taken, rename in pyproject.toml and README.md
  • Set up PyPI trusted publisher (see instructions above) before tagging your next release
  • Create a GitHub environment named pypi at https://github.com/Surt/cleo/settings/environments
  • After setup, test the full flow: git tag v0.3.0 && git push origin v0.3.0 and verify the release appears on both PyPI and GitHub Releases

Notes

  • The existing cleo bash/cmd wrappers and standalone CLI usage are unchanged — this is purely additive.
  • setuptools-scm derives the version from git tags automatically, so no need to manually edit version numbers in pyproject.toml.
  • The name cleo is taken on PyPI (used by the Poetry ecosystem), so cleo-pm is used instead. The CLI command is still cleo.

Link to Devin session: https://app.devin.ai/sessions/0e86578a44ae49b6a56e3579132c05fe
Requested by: @Surt

- Add pyproject.toml (package name: cleo-pm) with setuptools-scm for
  automatic versioning from git tags
- Add tools/__init__.py to make tools/ a proper Python package
- Add main_cli() entry point in cleo.py for console_scripts
- Add .github/workflows/release.yml: on v* tag push, runs tests, builds
  sdist+wheel, publishes to PyPI (trusted publisher), and creates a
  GitHub Release with auto-generated notes
- Update README: add pip install option and PyPI badge

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@devin-ai-integration
Copy link
Copy Markdown
Contributor Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

@Surt Surt merged commit 0866579 into main May 24, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant