Conversation
| TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} | ||
| TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} | ||
| run: | | ||
| python setup.py sdist bdist_wheel |
There was a problem hiding this comment.
I typically just execute
python setup.py sdist
without bdist_wheel. What is bdist_wheel for?
There was a problem hiding this comment.
I'm not sure to be honest, I just followed the sample workflow given here: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries. Let me take a look
|
Thanks for adding credentials, I just reread your emails about wanting to only publish on releases so I'm going to try to add this workflow into |
| TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} | ||
| run: | | ||
| python setup.py sdist bdist_wheel | ||
| twine upload dist/* |
There was a problem hiding this comment.
This line (twine upload dist/*) might work here, since it has just set up a fresh environment, and presumably there will only be one file in dist/ after executing the previous line.
But when I do this locally, it doesn't work, because files build up in the dist/ subdirectory, e.g.,
scadnano-0.9.6.tar.gz
scadnano-0.9.7.tar.gz
scadnano-0.9.8.tar.gz
PyPI only lets you upload a file with a given name/version once, because there's no concept of updating a given version. If you want to change anything, you always have to create a new version. So I always just execute a command such as
twine upload dist/scadnano-0.9.8.tar.gz
if 0.9.8 is the most recent version.
There was a problem hiding this comment.
Let me try on my local fork.
There was a problem hiding this comment.
The workflow works fine for uploading future ones: https://pypi.org/project/scadnano-copy/0.9.13/#history
Workflow: https://github.com/UnHumbleBen/scadnano-python-package-1/runs/863738183?check_suite_focus=true
I made up version 0.9.13 in my local fork the action worked fine, even though I previously had 0.9.8 uploaded already

@dave-doty Can you add the necessary secrets named
PYPI_USERNAMEandPYPI_PASSWORDto the repositories' secrets. I tried this out with my local fork secrets and it seems pretty safe in the sense that there is no way you can see the value of the secret that you entered. Even if you try to update them, Github will not show what was the previous value of the secret.