-
Notifications
You must be signed in to change notification settings - Fork 239
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
example: for GH Actions use action to publish #362
Conversation
to PyPI, instead of calling twine directly.
This is not a minimal example anymore. Could we just add this to a new example file And just out of curiosity: what are the "problems/tricks" you mentioned in #361 that are avoided by this method? |
sure, it's easily done and documented right here:
|
sure, I can do that easily. But imho this is a part of a minimal & useful example. People typically would want to publish the new wheel to PyPI. And honestly, this is just a single step added. |
The minimal example is pulled into the docs as a 'starting point' for configs, which, to be consistent with each other, show the minimum required to run cibuildwheel only. But we can link from that page to your example config showing how to upload to PyPI. |
Thanks! Given that this is a very sensible default (or stronger), I think it's good to include. This also nicely fits with the other examples we have. Ah, yes, OK. I knew about this, but never made the link with
Hmmm, not entirely sure. I still upload manually, just to be able to the build if there's an unexpected problem. Also, users might want to experiment first and only upload wheels afterwards. Or maybe they want to make wheels for private use. At any rate, it's not a core feature of cibuildwheel, so it's great to document but maybe not to include in the minimal example? |
ok, I'll revert and copy to an extended example. |
example showing pypi and GH release
Ok, sorry for the hustle! :( Turns out the action is still only suppported on linux. There's a way I've been using (to upload & download artifacts and from linux to call the action), but for this example it's probably not worth it. Feel free to close this and the issue. Sorry for wasting your time. |
That's actually the "correct" way to do it, ideally you want to make sure all jobs are successful before you upload, and you should upload once (there is now way to ignore existing in the action because of that). |
Egh, that's annoying. We can keep this PR in mind for when it gets supported, though, so that your work wasn't for nothing. If you notice something, do feel free to let us know! :-) (It's going to be quite interesting to see which one of all these newly create GitHub Actions is going to survive, in a few year, btw. I feel there's quite a few ad-hoc actions out there. But then again, this was from PyPA, so you'd think they'd support more than just Linux.) |
yea, so was my thinking. The irony is it was me who brought the issue up a year ago. |
Couldn't this just be changed to the correct way to do it, with jobs and artifacts? It's not much longer, and doesn't risk uploading some wheels when other wheels break. |
Also, if we had alternate arch support, like on Travis, then twine doesn't even work there. |
This is reinvented by everyone using gha, see also https://github.com/htm-community/htm.core/blob/master/.github/workflows/release.yml#L17 from #364 - I think it should be in the examples and docs... |
If something easily works, yes, we can make |
@henryiii I've implemented your suggestion from #361; do you mind having a look? Also, what did you mean by
Should something else still be added? |
…ated into the pypa/gh-action-pypi-publish action
Thanks, @henryiii! Fixed and pushed! :-) |
I've made a release with a pure python package using a similar setup, and I think this should work, but here are some suggestions:
release:
types:
- published
|
Where should I add this? |
https://github.com/joerick/cibuildwheel/pull/362/files#diff-b4971e357cad581b8716b72ee38f58a5R3 |
So ...
... ? |
…and specify to use only published releases
OK, done, both! @henryiii Is there anything left to do? Or could we merge this soon? |
Other than my one comment, I think it's ready. :) |
OK, @joerick, ready if you're happy, then. AppVeyor failing is related to current problems PyPy has with portably supporting macOS, it seems. See e.g. https://foss.heptapod.net/pypy/pypy/issues/3229. I currently don't really have the time to investigate this, though. Not sure if there's a quick and dirty solution. And also not sure why this is suddenly breaking: we're still using the same PyPy 7.3.1 release and binary, so AppVeyor's image must have changed? |
Since the other macOS builds are working, I would vote for an Appveyor change being the culprit. |
Yes, but it seems it's just exposing an issue in PyPy's linking to HomeBrew's |
Yes, that's what it looks like. |
Let's see: #371 |
Also, unrelated, but something weird seems to be happening to the
|
This should only happen if you have delocate on Windows. Which I don't think you should be doing, since it is for relocating macOS wheels (unless it also supports Windows wheels, which I don't think it does)... |
…" in GitHub Actions configurations
Yes, good point. But it is happening on the macOS build (that was failing, which is why I noticed this in the output). But the lines
do not show for Python 2.7. So maybe something with an old |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a small change from me. I agree, lets get this in.
to PyPI, instead of calling twine directly.
Fixes #361