Build and publish wheels for multiple platforms using pypa/cibuildwheel #170
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.
As per the discussion in #165 this PR adds a Github Actions workflow to build and optionally publish binary artifacts for major operating systems and Python versions using
cibuildwheel
.The action very much follows the example from the cibuildwheel docs - https://cibuildwheel.readthedocs.io/en/stable/setup/#github-actions
The publish step only runs when it sees a tagged commit - then this step will publish all the artifacts to pypi. To enable this you'll have to add a repository secret to your github repo. Pypi lets you create a tightly scoped api token that is allowed to upload packages for just one project - https://pypi.org/manage/account/token/
You'd add that as a repo secret - in this PR I've assumed a secret called
PYPI_API_TOKEN
- and this can be accessed by the github actions. Note this secret won't be accessible to a pull request from a fork (like mine), so the workflow would only run for pushes to your repository. I'd recommend having a read of github's security docs on this - https://docs.github.com/en/actions/security-guides/security-hardening-for-github-actionsAn example of the output can be seen in my fork via this github action, and in the files automatically uploaded to this pypi release.
Replaces #87
Closes #165