-
Notifications
You must be signed in to change notification settings - Fork 3
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
CI: Create workflow that builds and deploys wheels to PyPI #4
Conversation
Add a CI workflow that automatically builds mesa-interactive and deploys a wheel to PyPI. If runs on each push and pull request to test wheel building, but only deploys to PyPI when a tag is created.
Thank you very much for setting this up! |
Good catch on the repo name, and thanks for merging! |
I can't manage to create a commit tag on mobile. Do you want to create a PR where you bump the version in |
Should be quite easy, only I can't do it. You just first bump the version number in a regular commit, and then create a tag though the GitHub interface. For reference, here's the full workflow I personally use in my projects (ignore the parts about the release notes, you can start at step 7):
|
Yay it works! I somehow thought this works on commit tags and then creates a release on github. But going through GitHub releases is even easier, in my opinion. Oh and in the log I saw that PyPi now supports trusted publishing for GitHub. We might want to update the workflow here and on mesa. |
Glad it functions satisfactory!
This looks quite interesting, and I hadn't see it yet, so thanks for sharing! I will try to look into it next week and propose an updated workflow. |
Add a CI workflow that automatically builds mesa-interactive and deploys a wheel to PyPI. If runs on each push and pull request to test wheel building, but only deploys to PyPI when a tag is created.
To deploy to PyPI is uses the PyPI publish GitHub Action. It uses the API token feature of PyPI, which is recommended to restrict the access the action has.
The secret used in
${{ secrets.PYPI_API_TOKEN }}
needs to be created on the settings page. See Creating & using secrets.After uploading the API token, any maintainer can just create a new tag, after which this action will upload the wheel and dist to PyPI.