ibflex
ibflex copied to clipboard
Add GitHub Actions workflow for automated PyPI publishing
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:
- Create a GitHub environment called
pypi(Settings → Environments → New environment) - 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
- Owner:
- 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