pypa / gh-action-pypi-publish

The blessed :octocat: GitHub Action, for publishing your :package: distribution files to PyPI, the tokenless way: https://github.com/marketplace/actions/pypi-publish
https://packaging.python.org/guides/publishing-package-distribution-releases-using-github-actions-ci-cd-workflows/
BSD 3-Clause "New" or "Revised" License
930 stars 87 forks source link

Can't use https://pypi.org/p/<your-pypi-project-name> #242

Closed YarShev closed 5 months ago

YarShev commented 5 months ago

Hi guys,

I tried to upload my wheels to PyPI using https://pypi.org/p/<your-pypi-project-name> as shown on the readme and probably somewhere in docs but got an error.

ERROR    RedirectDetected: https://pypi.org/p/unidist attempted to redirect to  
         [https://pypi.org/p/unidist/.](https://pypi.org/p/unidist/)                                           
         Your repository URL is missing a trailing slash. Please add it and try 
         again.

Then I added a trailing slash and got the following error.

ERROR    InvalidPyPIUploadURL: It appears you're trying to upload to pypi.org   
         but have an invalid URL. You probably want one of these two URLs:      
         https://upload.pypi.org/legacy/ or [https://test.pypi.org/legacy/.](https://test.pypi.org/legacy/) Check
         your --repository-url value.

After specifying https://upload.pypi.org/legacy/ as url I was able to upload wheels succesfully.

It seems the readme and docs could require an update.

webknjaz commented 5 months ago

The readme and the docs are correct — they show how to add a clickable URL on GitHub using the environment: setting. You put that example string into the repository-url: input which is a different thing so it's expected that it wouldn't work.