Add automated PyPI publish workflow#8
Merged
Conversation
richdawe-cio
commented
Jun 26, 2026
| @@ -1,45 +0,0 @@ | |||
| name: Release | |||
Collaborator
Author
There was a problem hiding this comment.
This has been replaced by the publish workflow, which will be run automatically when a release is made.
richdawe-cio
commented
Jun 26, 2026
| - uses: actions/checkout@v6 | ||
| - uses: actions/checkout@v7 | ||
| with: | ||
| fetch-depth: 0 |
Collaborator
Author
There was a problem hiding this comment.
Added fetch-depth for consistency with customerio-python.
jatinn
approved these changes
Jun 26, 2026
This was referenced Jun 26, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Like customerio/customerio-python#120 :
See the GH action docs at https://github.com/pypa/gh-action-pypi-publish
Pre-requisites for this to work:
pypion this repo, for use by the publishing workflow.Note
Medium Risk
Changes how production packages reach PyPI (trusted publishing vs token/twine); misconfigured release or PyPI trust settings could block or mis-publish releases.
Overview
Replaces manual PyPI releases with a GitHub Release–triggered publish pipeline. The old
release.ymlworkflow (manualworkflow_dispatch,bump2version,setup.py+twineusingPYPI_TOKEN) is removed.Adds
.github/workflows/publish.yml, which runs when a release is published: checks out the repo, builds withpython -m build, and uploads to PyPI viapypa/gh-action-pypi-publishusing OIDC (id-token: write,environment: pypi) instead of a stored token.Lint and test workflows bump
actions/checkoutfrom v6 to v7 and setfetch-depth: 0on checkout (aligned with the new publish job).Reviewed by Cursor Bugbot for commit cf703c5. Bugbot is set up for automated code reviews on this repo. Configure here.