lofar-astron / RMextract

extract TEC, vTEC, Earthmagnetic field and Rotation Measures from GPS and WMM data for radio interferometry observations
GNU General Public License v3.0
31 stars 22 forks source link

Add automatic PyPI build+upload #60

Open AlecThomson opened 4 months ago

AlecThomson commented 4 months ago

Closes #57

Modified GitHub Action config following python packaging guide.

This will trigger on each v*.*.* tag. I've commented out github-release and publish-to-testpypi sections, but they can be easily re-enabled.

To enable, the following configuration is required:

  1. Go to https://pypi.org/manage/account/publishing/.

  2. Fill in the name you wish to publish your new PyPI project under (the name value in your setup.cfg or pyproject.toml), the GitHub repository owner’s name (org or user), and repository name, and the name of the release workflow file under the .github/ folder, see Creating a workflow definition. Finally, add the name of the GitHub Environment (pypi) we’re going set up under your repository. Register the trusted publisher.

gmloose commented 4 months ago

This workflow builds native python wheels, which is fine for packages that don't contain compiled extensions. However, we need to use cibuildwheel to build portable binary wheels using manylinux. Have a look at the examples I gave.