File tree 1 file changed +38
-0
lines changed
1 file changed +38
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Deploy to PyPi
2
+
3
+ on :
4
+ release :
5
+ types : [published]
6
+
7
+ jobs :
8
+
9
+ build :
10
+ runs-on : ubuntu-latest
11
+ steps :
12
+
13
+ - name : Checkout source code
14
+ uses : actions/checkout@v1
15
+
16
+
17
+ - name : Use Python 3
18
+ uses : actions/setup-python@v1
19
+ with :
20
+ python-version : ' 3.6'
21
+ architecture : ' x64'
22
+
23
+
24
+ - name : Deploy to PyPi
25
+ if : success() && startsWith(github.ref, 'refs/tags/v')
26
+ env :
27
+ GITHUB_REF_TAG : ${{ github.ref }}
28
+ PYPI_TOKEN : ${{ secrets.PYPI_TOKEN }}
29
+ run : |
30
+ export VERSION=${GITHUB_REF_TAG:10:50}
31
+ echo "Version is $VERSION"
32
+ pip install --no-cache-dir twine pipenv wheel
33
+ sed -i "s/@@VERSION@@/$CI_COMMIT_TAG/g" ./setup.py
34
+ pipenv lock -r > requirements.txt
35
+ python setup.py install
36
+ python setup.py sdist
37
+ python setup.py bdist_wheel
38
+ twine upload -r pypi -u __token__ -p "${PYPI_TOKEN}" dist/*
You can’t perform that action at this time.
0 commit comments