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

Automate the upload to PyPI via CI #33

Closed
wants to merge 12 commits into from

Conversation

igorauad
Copy link
Contributor

@igorauad igorauad commented Oct 14, 2020

Add job on the build workflow to automate the uploading to PyPi. Upload the
source distribution file (produced by sdist) and all built wheels (.whl files).

The implementation is based on the example from cibuildwheel, except for the tag
format. Expect version tags to be formatted as zfec-x.y.z.

This job requires secret pypi_password to be set on the repository.

Add job on the build workflow to automate the uploading to PyPi. Upload the
source distribution file (produced by sdist) and all built wheels (.whl files).

The implementation is based on the example from cibuildwheel, except for the tag
format. Expect version tags to be formatted as `zfec-x.y.z`.
Copy link
Member

@sajith sajith left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, @igorauad!

The PR looks good to me, but I do not have the privilege to manage secrets in this repository. Unless we set the secret correctly, I expect that upload_pypi will fail even if I go ahead and merge this PR. I don't know who can/should manage secrets either. Which is why I took the lazy route and omitted adding this bit when I initially added cibuildwheel configuration. ;-)

Also, zfec is not a super active project, so I was unsure the hassle of automating this step would be worthwhile.

I don't know the deal with failing windows-latest/pypy3 CI failures. I probably should investigate that.

@igorauad
Copy link
Contributor Author

@sajith Thanks for your reply. I see. It's probably a similar effort to push to PyPI manually this time and to review the PR. But anyway, it's a convenience that could help in the future. It wouldn't hurt for sure :)

Nevertheless, as I pointed out in #32 , I'm more interested in solving the missing 1.5.4 on PyPI. The PR was just a related change.

Unless we set the secret correctly, I expect that upload_pypi will fail even if I go ahead and merge this PR.

For sure. Anyway, I suppose the person/maintainer who has admin rights on this repo might be the person who has the token to push to PyPI. So my problem (the missing 1.5.4 on PyPI) is in his/her hands anyways :)

I don't know the deal with failing windows-latest/pypy3 CI failures. I probably should investigate that.

I saw that but didn't look further, as I didn't touch any python code. Shall I re-run and see if there is any racing or something? Or did you just re-run it?

@sajith
Copy link
Member

sajith commented Oct 15, 2020

I saw that but didn't look further, as I didn't touch any python code. Shall I re-run and see if there is any racing or something? Or did you just re-run it?

I did re-run it, and it resulted in the same error. I guess Windows/pypy3 setup on GitHub Actions has changed since it was last tested. I will investigate, but I am sure that failure is not relevant to this PR anyway.

@exarkun
Copy link
Member

exarkun commented Jan 25, 2022

It looks like I have upload permission to zfec. I can try to get this landed.

@exarkun
Copy link
Member

exarkun commented Jan 28, 2022

#62 has some more changes I thought would be interesting to go along with this, and is in-repo so it can get the secrets from GitHub Actions and demonstrate the automation works on test.pypi.org.

@exarkun exarkun closed this Jan 28, 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.

None yet

3 participants