File tree Expand file tree Collapse file tree 1 file changed +34
-0
lines changed Expand file tree Collapse file tree 1 file changed +34
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Python publish
2+
3+ on :
4+ release :
5+ branches :
6+ - main
7+
8+ jobs :
9+ build :
10+ runs-on : ubuntu-latest
11+ strategy :
12+ matrix :
13+ python-version : [3.9]
14+ steps :
15+ - uses : actions/checkout@v2
16+ - name : Set up Python ${{ matrix.python-version }}
17+ uses : actions/setup-python@v2
18+ with :
19+ python-version : ${{ matrix.python-version }}
20+ - name : Install dependencies
21+ run : |
22+ python -m pip install --upgrade pip
23+ pip install setuptools wheel twine
24+ if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
25+ - name : Test with pytest
26+ run : |
27+ python -m unittest test
28+ - name : Build and publish
29+ env :
30+ TWINE_USERNAME : ${{ secrets.PYPI_USERNAME }}
31+ TWINE_PASSWORD : ${{ secrets.PYPI_PASSWORD }}
32+ run : |
33+ python setup.py sdist bdist_wheel
34+ python3 -m twine upload --skip-existing --repository pypi dist/*
You can’t perform that action at this time.
0 commit comments