ibflex icon indicating copy to clipboard operation
ibflex copied to clipboard

Add GitHub Actions workflow for automated PyPI publishing

Open robcohen opened this issue 1 month ago • 0 comments

Summary

This adds a GitHub Actions workflow that automatically publishes to PyPI when you create a release.

Background

I needed ibflex for a project but the PyPI version (0.15, Jan 2021) is missing years of updates. Rather than just complain, I set up CI and published a fork as ibflex2 to unblock myself and others.

This PR

Adds .github/workflows/publish.yml that:

  • Triggers on GitHub release creation
  • Builds the package using python -m build
  • Publishes to PyPI using trusted publishing (no tokens needed)

Setup Required

To use this, you'll need to:

  1. Create a GitHub environment called pypi (Settings → Environments → New environment)
  2. Configure "trusted publishing" on PyPI:
    • Go to https://pypi.org/manage/project/ibflex/settings/publishing/
    • Add a trusted publisher with:
      • Owner: csingley
      • Repository: ibflex
      • Workflow: publish.yml
      • Environment: pypi
  3. Create a release and it will auto-publish

If You'd Prefer Not To

No worries - ibflex2 exists on PyPI for those who need current updates. If you do start publishing regular releases, I'm happy to deprecate the fork.

Closes #73

robcohen avatar Dec 16 '25 17:12 robcohen