-
Notifications
You must be signed in to change notification settings - Fork 200
Github action to publish to PyPI #443
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
Github action to publish to PyPI #443
Conversation
|
Thank you for doing the research here and I'm sorry I have not had time to dedicate here. I'll take a look at these tonight. |
|
The steps from the top comment are complete. Do we need to update the code anyplace now? I can read the pages in more detail later, in Zoom meetings all day, yay! |
|
I think this action should work independently. If it's a question regarding the state of the code & outstanding PRs before a new release, I'd have to defer back to you. |
|
Anything I can help with here @pkkid? |
|
I'm sorry I misinterpreted the comment above, thinking I didn't need to do anything more here yet. I believe the next steps are to setup a file per these instructions: https://packaging.python.org/guides/publishing-package-distribution-releases-using-github-actions-ci-cd-workflows/ @Hellowlol @blacktwin - Do we want it to push every time we do a tagged commit (per the example)? |
|
That's a different process for a similar result. The link above also doesn't seem to handle actually building the package, just publishing. Note from that page: https://github.com/pypa/gh-action-pypi-publish#non-goals. I reviewed this PR and changed the trigger to only run the Github Action on published releases. So the workflow should be as simple as:
Once that's done the action should fire, spin up an Ubuntu instance, build the package, and upload it to PyPI using the token. One thing that I didn't consider is Python 2.x support. This action is only set to build for 3.x and I don't think there's been an explicit announcement of the project's end of support for 2.x. Thoughts? |
|
Yes, since you are the only one access to the pypi account it would be nice to be able to push a release, some projects cant install from github etc. |
|
@Hellowlol Just added you on PyPi. |
The point of this script is that anyone that can publish a release on github (i.e., collaborators) can also push to PyPI. I'd think that basing off releases instead of tags will make it easier to keep things in sync. For example, the "missing" 3.3.0 github release. |
|
@pkkid @Hellowlol if the PyPI token is in place, are there any objections to merging this PR and creating a 3.4.0 release from the current master? |
|
I think we should create builds for Python 2 (3.4.0) then merge any outstanding prs, drop py2 and push 4.0.0 |
|
@pkkid yes, it should push a new version on each tag. We have support for this now using travis. But its only released if all tests pass (our tests are to flaky) |
ada9f40 to
cfca54b
Compare
|
Rebased with all the recent test fixes and it passes. Thanks, @Hellowlol! Since Travis is already capable of pushing to PyPI (if all tests pass), what's the consensus on the necessity of this PR now? |
|
Updated workflow here: (Remove test |
|
Change https://github.com/pkkid/python-plexapi/blob/master/setup.py#L38 |
cfca54b to
e1f14de
Compare
Codecov Report
@@ Coverage Diff @@
## master #443 +/- ##
=======================================
Coverage 65.86% 65.86%
=======================================
Files 20 20
Lines 4137 4137
=======================================
Hits 2725 2725
Misses 1412 1412 Continue to review full report at Codecov.
|
Let's do this at the next major release unless there's a reason it has to be done with this PR. |
|
Travis is gone. Time to merge this? |
This is a Github Actions workflow to automatically publish tagged releases to PyPI as described here.
This will require @pkkid to:
PYPI_TOKENin the repository's encrypted secretsMore details about the encrypted secrets here: https://help.github.com/en/actions/configuring-and-managing-workflows/creating-and-storing-encrypted-secrets.