Skip to content

Conversation

@ltawfik
Copy link
Collaborator

@ltawfik ltawfik commented Jun 27, 2025

Summary

This PR updates the release workflow to automatically create a PR with version updates after publishing to PyPI, eliminating the need for manual version syncing.

Problem

Currently, after publishing a new version to PyPI, the version in the repository (pyproject.toml) remains outdated. This has led to a version mismatch where:

  • Repository shows: v0.0.10
  • PyPI shows: v0.0.12

Solution

  1. **Updated **: After successfully publishing to PyPI, the workflow now:

    • Creates a new branch
    • Commits the version updates
    • Opens a PR automatically
  2. **Added **: When a release PR is merged, this workflow:

    • Creates a git tag for the version
    • Creates a GitHub release

Benefits

  • ✅ No more manual version updates
  • ✅ Repository version always matches PyPI
  • ✅ Automatic release tagging
  • ✅ Clear audit trail via PRs

Note

PRs created by the workflow won't automatically trigger CI due to GitHub's security model. To run CI on the version update PR, you can:

  • Push an empty commit to the branch
  • Close and reopen the PR
  • Or merge directly if you trust the release process

Testing

The next release will use this automated process. The workflow will:

  1. Publish to PyPI as usual
  2. Create a PR titled "chore: bump version to X.X.X"
  3. After merging, create a release tag automatically

- Update publish.yml to create PR after publishing
- Add create-release-tag.yml to tag releases when PR merges
- Eliminates manual version syncing between repo and PyPI
@ltawfik ltawfik merged commit b3c20bd into main Jun 28, 2025
6 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.

3 participants