@@ -83,19 +83,19 @@ jobs:
8383 bash <(curl -s https://codecov.io/bash)
8484
8585 - name : Install distribution dependencies
86- run : pip install --upgrade twine setuptools wheel
87- if : matrix.python-version == 3.10
86+ run : pip install build
87+ if : matrix.python-version == 3.11
8888
8989 - name : Create distribution package
90- run : python setup.py sdist bdist_wheel
91- if : matrix.python-version == 3.10
90+ run : python -m build
91+ if : matrix.python-version == 3.11
9292
9393 - name : Upload distribution package
9494 uses : actions/upload-artifact@master
9595 with :
96- name : dist-package-${{ matrix.python-version }}
96+ name : dist
9797 path : dist
98- if : matrix.python-version == 3.10
98+ if : matrix.python-version == 3.11
9999
100100 publish :
101101 runs-on : ubuntu-latest
@@ -105,17 +105,28 @@ jobs:
105105 - name : Download a distribution artifact
106106 uses : actions/download-artifact@v2
107107 with :
108- name : dist-package-3.10
108+ name : dist
109109 path : dist
110- - name : Publish distribution 📦 to Test PyPI
111- uses : pypa/gh-action-pypi-publish@master
110+
111+ - name : Use Python 3.11
112+ uses : actions/setup-python@v1
112113 with :
113- skip_existing : true
114- user : __token__
115- password : ${{ secrets.test_pypi_password }}
116- repository_url : https://test.pypi.org/legacy/
114+ python-version : ' 3.11'
115+
116+ - name : Install dependencies
117+ run : |
118+ pip install twine
119+
120+ - name : Publish distribution 📦 to Test PyPI
121+ run : |
122+ twine upload -r testpypi dist/*
123+ env :
124+ TWINE_USERNAME : __token__
125+ TWINE_PASSWORD : ${{ secrets.test_pypi_password }}
126+
117127 - name : Publish distribution 📦 to PyPI
118- uses : pypa/gh-action-pypi-publish@master
119- with :
120- user : __token__
121- password : ${{ secrets.pypi_password }}
128+ run : |
129+ twine upload -r pypi dist/*
130+ env :
131+ TWINE_USERNAME : __token__
132+ TWINE_PASSWORD : ${{ secrets.pypi_password }}
0 commit comments