File tree Expand file tree Collapse file tree 2 files changed +17
-28
lines changed Expand file tree Collapse file tree 2 files changed +17
-28
lines changed Original file line number Diff line number Diff line change 55 types : [created]
66
77jobs :
8- testpypi- publish :
9- name : Publish release to TestPyPI
8+ publish :
9+ name : Publish PyPI
1010 runs-on : ubuntu-latest
11- if : github.ref == 'refs/heads/main' && github.event_name == 'push'
12- environment :
13- name : pypi
14- url : https://pypi.org/p/wrapper-tls-requests
15- permissions :
16- id-token : write # IMPORTANT: mandatory for sigstore
1711 steps :
18- - name : Publish package to TestPyPI
19- uses : pypa/gh-action-pypi-publish@release/v1
12+ - name : Set up Python 3.9
13+ uses : actions/setup-python@v4
2014 with :
21- password : ${{ secrets.TEST_PYPI_API_TOKEN }}
22- repository-url : https://test.pypi.org/legacy/
23-
24- pypi-publish :
25- name : Publish release to PyPI
26- needs : testpypi-publish
27- runs-on : ubuntu-latest
28- environment :
29- name : pypi
30- url : https://pypi.org/p/wrapper-tls-requests
31- permissions :
32- id-token : write # IMPORTANT: mandatory for sigstore
33- steps :
34- - name : Publish package to PyPI
35- uses : pypa/gh-action-pypi-publish@release/v1
36- with :
37- password : ${{ secrets.PYPI_API_TOKEN }}
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/*
Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ publish-test-pypi:
2626 python -m pip install -r requirements-dev.txt
2727 python -m pip install ' twine>=6.0.1'
2828 python setup.py sdist bdist_wheel
29- twine upload --repository testpypi dist/*
29+ twine upload --repository testpypi --skip-existing dist/*
3030 rm -rf build dist .egg wrapper_tls_requests.egg-info
3131
3232publish-pypi :
You can’t perform that action at this time.
0 commit comments