Skip to content

Add automated PyPI publish workflow#120

Merged
hownowstephen merged 2 commits intomainfrom
MESS-673_fix-packaging-hygiene
May 7, 2026
Merged

Add automated PyPI publish workflow#120
hownowstephen merged 2 commits intomainfrom
MESS-673_fix-packaging-hygiene

Conversation

@hownowstephen
Copy link
Copy Markdown
Contributor

@hownowstephen hownowstephen commented May 7, 2026

Summary

Setup required after merge

  1. Create a pypi environment in GitHub repo settings
  2. Configure trusted publishing on PyPI for customerio/customerio-pythonpublish.ymlpublish job

Closes #112

Test plan

  • python -m build produces both .whl and .tar.gz
  • Wheel contains only customerio/ package (no tests/)
  • Sdist contains only customerio/ package (no tests/)
  • Workflow YAML is valid (uses standard pypa/gh-action-pypi-publish@release/v1)

Note

Medium Risk
Automates artifact publishing to PyPI on GitHub Release events, so misconfiguration (e.g., trusted publishing/OIDC or Python version availability) could block releases or publish unintended builds.

Overview
Adds a new GitHub Actions workflow (.github/workflows/publish.yml) that triggers on release.published, builds the package (python -m build for wheel + sdist), and publishes to PyPI using pypa/gh-action-pypi-publish with OIDC (id-token: write) in the pypi environment.

Reviewed by Cursor Bugbot for commit da689fd. Bugbot is set up for automated code reviews on this repo. Configure here.

Adds a GitHub Actions workflow triggered on releases that builds and
publishes both wheel and sdist to PyPI using trusted publishing (OIDC).
Previously only sdist was available on PyPI because publishing was manual.

Requires configuring a "pypi" environment in GitHub repo settings and
setting up trusted publishing on PyPI for this repo.

Closes #112
@hownowstephen hownowstephen merged commit 4e3d201 into main May 7, 2026
10 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.

publish a wheel

2 participants