File tree Expand file tree Collapse file tree 1 file changed +36
-0
lines changed Expand file tree Collapse file tree 1 file changed +36
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Publish
2+
3+ on :
4+ push :
5+ branches :
6+ - master
7+
8+ jobs :
9+ publish :
10+ runs-on : ubuntu-20.04
11+ if : startsWith(github.event.ref, 'refs/tags/')
12+
13+ steps :
14+ - uses : actions/checkout@v2
15+
16+ - name : Set up Python 3.8
17+ uses : actions/setup-python@v2
18+ with :
19+ python-version : 3.8
20+
21+ - name : Check Tag
22+ id : check-release-tag
23+ run : |
24+ if [[ ${{ github.event.ref }} =~ ^refs/tags/v[0-9]+[.][0-9]+[.][0-9]+(rc[0-9]+|[.]dev[0-9]+)?$ ]]; then
25+ echo ::set-output name=release_tag::true
26+ fi
27+
28+ - name : Publish to PyPI
29+ if : steps.check-release-tag.outputs.release_tag == 'true'
30+ run : |
31+ pip install --upgrade pip
32+ pip install --upgrade setuptools wheel twine
33+ python setup.py sdist bdist_wheel
34+ export TWINE_USERNAME=__token__
35+ export TWINE_PASSWORD=${{ secrets.PYPI_TOKEN }}
36+ twine upload dist/*
You can’t perform that action at this time.
0 commit comments