Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build and publish wheels for multiple platforms using pypa/cibuildwheel #170

Merged

Conversation

hardbyte
Copy link
Contributor

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-actions

An 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

@hardbyte hardbyte mentioned this pull request Feb 28, 2022
@ilanschnell ilanschnell merged commit 2b48973 into ilanschnell:master Mar 1, 2022
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.

Provide prebuilt wheels on all support os/arch/python combos
2 participants