1212 - " *"
1313
1414env :
15- PROJECT_NAME : configuration
15+ PROJECT_NAME : config
1616
1717jobs :
1818 build :
5555 run : |
5656 echo "Running linters"
5757
58+ pip install black
5859 flake8 .
5960 isort --check-only . 2>&1
6061 black --check . 2>&1
@@ -71,19 +72,19 @@ jobs:
7172 bash <(curl -s https://codecov.io/bash)
7273
7374 - name : Install distribution dependencies
74- run : pip install --upgrade twine setuptools wheel
75- if : matrix.python-version == 3.10
75+ run : pip install build
76+ if : matrix.python-version == 3.11
7677
7778 - name : Create distribution package
78- run : python setup.py sdist bdist_wheel
79- if : matrix.python-version == 3.10
79+ run : python -m build
80+ if : matrix.python-version == 3.11
8081
8182 - name : Upload distribution package
8283 uses : actions/upload-artifact@master
8384 with :
84- name : dist-package-${{ matrix.python-version }}
85+ name : dist
8586 path : dist
86- if : matrix.python-version == 3.10
87+ if : matrix.python-version == 3.11
8788
8889 publish :
8990 runs-on : ubuntu-latest
@@ -93,17 +94,28 @@ jobs:
9394 - name : Download a distribution artifact
9495 uses : actions/download-artifact@v2
9596 with :
96- name : dist-package-3.10
97+ name : dist
9798 path : dist
98- - name : Publish distribution 📦 to Test PyPI
99- uses : pypa/gh-action-pypi-publish@master
99+
100+ - name : Use Python 3.11
101+ uses : actions/setup-python@v1
100102 with :
101- skip_existing : true
102- user : __token__
103- password : ${{ secrets.test_pypi_password }}
104- repository_url : https://test.pypi.org/legacy/
103+ python-version : ' 3.11'
104+
105+ - name : Install dependencies
106+ run : |
107+ pip install twine
108+
109+ - name : Publish distribution 📦 to Test PyPI
110+ run : |
111+ twine upload -r testpypi dist/*
112+ env :
113+ TWINE_USERNAME : __token__
114+ TWINE_PASSWORD : ${{ secrets.test_pypi_password }}
115+
105116 - name : Publish distribution 📦 to PyPI
106- uses : pypa/gh-action-pypi-publish@master
107- with :
108- user : __token__
109- password : ${{ secrets.pypi_password }}
117+ run : |
118+ twine upload -r pypi dist/*
119+ env :
120+ TWINE_USERNAME : __token__
121+ TWINE_PASSWORD : ${{ secrets.pypi_password }}
0 commit comments