tahoe-lafs / zfec

zfec -- an efficient, portable erasure coding tool
Other
374 stars 44 forks source link

Automate the upload to PyPI via CI #33

Closed igorauad closed 2 years ago

igorauad commented 3 years ago

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.

igorauad commented 3 years ago

@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 commented 3 years ago

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 commented 2 years ago

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

exarkun commented 2 years ago

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.