@@ -5,33 +5,34 @@ name: Publish Python 🐍 distributions 📦 to TestPyPI and PyPI
55on :
66 release :
77 types : [published]
8-
8+
99jobs :
1010 deploy :
11+
1112 runs-on : ubuntu-latest
13+
1214 steps :
13- - uses : actions/checkout@v2
14- - name : Fetch all history for all tags and branches
15- run : git fetch --prune --unshallow
16- - name : Set up Python 3.8
17- uses : actions/setup-python@v2
18- with :
19- python-version : 3.8
20- - name : Install dependencies
21- run : |
22- python -m pip install --upgrade pip
23- pip install versiontag
24- pip install build
25- - name : Build package
26- run : python -m build
27- - name : Publish package to TestPyPI
28- uses : pypa/gh-action-pypi-publish@master
29- with :
30- user : __token__
31- password : ${{ secrets.TEST_PYPI_API_TOKEN }}
32- repository_url : https://test.pypi.org/legacy/
33- - name : Publish package to PyPI
34- uses : pypa/gh-action-pypi-publish@master
35- with :
36- user : __token__
37- password : ${{ secrets.PYPI_API_TOKEN }}
15+ - uses : actions/checkout@v2
16+ - name : Set up Python
17+ uses : actions/setup-python@v2
18+ with :
19+ python-version : 3.8
20+ - name : Install dependencies
21+ run : |
22+ python -m pip install --upgrade pip
23+ pip install setuptools wheel twine
24+ - name : Build and publish to TestPyPI
25+ env :
26+ TWINE_USERNAME : ${{ secrets.PYPI_USERNAME }}
27+ TWINE_PASSWORD : ${{ secrets.PYPI_PASSWORD }}
28+ run : |
29+ python setup.py sdist bdist_wheel
30+ twine upload --repository testpypi dist/*
31+ - name : Build and publish to PyPI
32+ env :
33+ TWINE_USERNAME : ${{ secrets.PYPI_USERNAME }}
34+ TWINE_PASSWORD : ${{ secrets.PYPI_PASSWORD }}
35+ run : |
36+ python setup.py sdist bdist_wheel
37+ twine upload dist/*
38+
0 commit comments