File tree Expand file tree Collapse file tree 1 file changed +26
-2
lines changed Expand file tree Collapse file tree 1 file changed +26
-2
lines changed Original file line number Diff line number Diff line change @@ -2,14 +2,15 @@ name: Check test and code linting
22on : [push]
33
44jobs :
5- pre-commit :
5+ lint :
66 runs-on : ubuntu-latest
77 steps :
88 - uses : actions/checkout@v3
99 -
uses :
pre-commit/[email protected] 1010
11- build :
11+ test :
1212 runs-on : ubuntu-20.04
13+ needs : lint
1314 strategy :
1415 matrix :
1516 include :
3132 pip install tox codecov
3233 - name : Run tests
3334 run : tox -e ${{ matrix.tox || 'py' }}
35+
36+ publish :
37+ needs : test
38+ if : github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
39+ steps :
40+ - uses : actions/checkout@master
41+ - name : Set up Python 3.11
42+ uses : actions/setup-python@v3
43+ with :
44+ python-version : " 3.11"
45+
46+ - name : Install dependencies
47+ run : |
48+ python -m pip install --upgrade pip
49+ pip install setuptools wheel twine
50+
51+ - name : Build and publish
52+ env :
53+ TWINE_USERNAME : __token__
54+ TWINE_PASSWORD : ${{ secrets.PYPI_TOKEN }}
55+ run : |
56+ python setup.py sdist bdist_wheel
57+ twine upload dist/*
You can’t perform that action at this time.
0 commit comments