File tree Expand file tree Collapse file tree 3 files changed +22
-20
lines changed
Expand file tree Collapse file tree 3 files changed +22
-20
lines changed Original file line number Diff line number Diff line change 1- name : Upload Python Package to PyPI
1+ name : Upload Python Package
22
33on :
44 release :
5- types : [created]
5+ types : [created, edited ]
66
77jobs :
8- publish :
8+ deploy :
99 name : Publish PyPI
1010 runs-on : ubuntu-latest
1111 steps :
12- - name : Set up Python 3.9
13- uses : actions/setup-python@v4
14- with :
15- python-version : ' 3.9'
16- - name : Install pypa/build
17- run : |
18- python -m pip install --upgrade pip
19- pip install setuptools wheel twine
20- - name : Build and publish
21- env :
22- TWINE_USERNAME : __token__
23- TWINE_PASSWORD : ${{ secrets.PYPI_API_TOKEN }}
24- run : |
25- python setup.py sdist bdist_wheel
26- twine upload dist/*
12+ - uses : actions/checkout@master
13+ - name : Set up Python 3.9
14+ uses : actions/setup-python@v3
15+ with :
16+ python-version : ' 3.9'
17+ - name : Install dependencies
18+ run : |
19+ python -m pip install --upgrade pip
20+ pip install setuptools wheel twine
21+ - name : Build a binary wheel
22+ run : >-
23+ python setup.py sdist bdist_wheel
24+ - name : Publish distribution 📦 to PyPI
25+ uses : pypa/gh-action-pypi-publish@master
26+ with :
27+ password : ${{ secrets.PYPI_API_TOKEN }}
28+ skip-existing : true
Original file line number Diff line number Diff line change @@ -33,5 +33,5 @@ publish-pypi:
3333 python -m pip install -r requirements-dev.txt
3434 python -m pip install ' twine>=6.0.1'
3535 python setup.py sdist bdist_wheel
36- twine upload dist/*
36+ twine upload --skip-existing dist/*
3737 rm -rf build dist .egg wrapper_tls_requests.egg-info
Original file line number Diff line number Diff line change @@ -237,7 +237,7 @@ def from_tls_response(
237237 ) -> "Response" :
238238 def _parse_response_body (value : Optional [str ]) -> bytes :
239239 if value :
240- if is_byte_response :
240+ if is_byte_response and response . status > 0 :
241241 try :
242242 value = b64decode (value .split ("," )[- 1 ])
243243 return value
You can’t perform that action at this time.
0 commit comments