File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -148,13 +148,19 @@ runs:
148148 TWINE_USERNAME : ${{ inputs.pypi-user }}
149149 TWINE_PASSWORD : ${{ inputs.pypi-token }}
150150 shell : bash
151+ # If I understand correctly then default PyPI is a bit weird in that it has a different upload URL.
151152 run : |
152153 if [ "${TWINE_PASSWORD}" == "false" ]; then
153154 unset TWINE_USERNAME
154155 unset TWINE_PASSWORD
155156 fi
156157 python -m pip install twine
157- python -m twine upload --repository-url ${{ inputs.pypi-repository-url }} --verbose --non-interactive dist/*
158+ if [ ${{ inputs.pypi-repository-url }} == https://pypi.org/ ]; then
159+ export REPO_URL=https://upload.pypi.org/legacy/
160+ else
161+ export REPO_URL=${{ inputs.pypi-repository-url }}
162+ fi
163+ python -m twine upload --repository-url $REPO_URL --verbose --non-interactive dist/*
158164
159165 - name : Tag
160166 if : (steps.get-versions.outputs.new-version == 'true') && (steps.test-sdist.outputs.result == 'true') && (steps.test-bdist-wheel.outputs.result == 'true')
You can’t perform that action at this time.
0 commit comments