File tree Expand file tree Collapse file tree 1 file changed +33
-0
lines changed Expand file tree Collapse file tree 1 file changed +33
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Release CI
2
+
3
+ on :
4
+ release :
5
+ types : [published]
6
+
7
+ jobs :
8
+ upload-pypi :
9
+ runs-on : ubuntu-latest
10
+ steps :
11
+ - uses : actions/checkout@v1
12
+ - name : Check For setup.py
13
+ id : need-pypi
14
+ run : |
15
+ echo ::set-output name=setup-py::$( find . -wholename './setup.py' )
16
+ - name : Set up Python
17
+ if : contains(steps.need-pypi.outputs.setup-py, 'setup.py')
18
+ uses : actions/setup-python@v1
19
+ with :
20
+ python-version : ' 3.x'
21
+ - name : Install dependencies
22
+ if : contains(steps.need-pypi.outputs.setup-py, 'setup.py')
23
+ run : |
24
+ python -m pip install --upgrade pip
25
+ pip install setuptools wheel twine
26
+ - name : Build and publish
27
+ if : contains(steps.need-pypi.outputs.setup-py, 'setup.py')
28
+ env :
29
+ TWINE_USERNAME : ${{ secrets.PYPI_USERNAME }}
30
+ TWINE_PASSWORD : ${{ secrets.PYPI_PASSWORD }}
31
+ run : |
32
+ python setup.py sdist
33
+ twine upload dist/*
You can’t perform that action at this time.
0 commit comments