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
add pypa/gh-action-pypi-publish #717
Conversation
@miniupnp, do you already have implemented, or have in mind, a mechanism for triggering releases on GitHub that you want to use for the automated upload to PyPI? If so, I can look into how to create the proper condition to implement that here. |
https://github.com/miniupnp/miniupnp/blob/master/appveyor.yml#L102C1-L102C94 |
I was referring more to what action you want to result in an upload. Do you want it to publish when you push a tag? Manually trigger the workflow (dispatch it in Actions speak, I believe)? Initiate a GitHub release? Or maybe you are saying you always run the upload step every time the building is done and since you have |
That's it ;) |
Ok, so we have a bit of a special start case here then. You'll probably want to delete the following two lines whenever you want to do a release. If we take them out now it will start trying to upload immediately. It will presumably fail for my external PR. But... on
I have a couple more things to add. I set this up over in pytest-twisted over the weekend and found a couple things I had missed here. |
Ah, looks like I only forgot it over there and here is ok actually. |
@miniupnp, does Also looks like the build needs a fix. From https://github.com/miniupnp/miniupnp/actions/workflows/miniupnpc_wheels.yml?query=branch%3Amaster it looks like 752507e broke it, but that is just a comment change so it seems more likely that some not-pinned dependency changed? Maybe you will recognize the error.
|
2b4c0c5 has fixed the build. |
thats ok ! |
I think we're good now. Remember to follow the instructions for the 'authorization' setup provided at https://docs.pypi.org/trusted-publishers/adding-a-publisher/. |
|
PyPA has provided a specific action for uploading to PyPI. https://github.com/pypa/gh-action-pypi-publish It can be used in various ways but my understanding is that the trusted publisher mode is preferred. Instructions for the 'authorization' setup are provided at https://docs.pypi.org/trusted-publishers/adding-a-publisher/.
Draft for:
if: false