File tree 1 file changed +51
-0
lines changed
1 file changed +51
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : release
2
+
3
+ on :
4
+ push :
5
+ tags :
6
+ - ' v*' # Push events to matching v*, i.e. v1.0, v20.15.10
7
+
8
+ jobs :
9
+ build :
10
+ name : Create Release
11
+ runs-on : ubuntu-latest
12
+ steps :
13
+ - name : Checkout code
14
+ uses : actions/checkout@master
15
+ - name : Create Release
16
+ id : create_release
17
+ uses : actions/create-release@latest
18
+ env :
19
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
20
+ with :
21
+ tag_name : ${{ github.ref }}
22
+ release_name : Release ${{ github.ref }}
23
+ body : |
24
+ Changes in this Release
25
+ - ${{ github.ref }}
26
+ draft : false
27
+ prerelease : false
28
+
29
+ deploy :
30
+ name : Publish package
31
+ runs-on : ubuntu-latest
32
+
33
+ steps :
34
+ - uses : actions/checkout@v2
35
+ - name : Set up Python
36
+ uses : actions/setup-python@v1
37
+ with :
38
+ python-version : ' 3.x'
39
+ - name : Install dependencies
40
+ run : |
41
+ python -m pip install --upgrade pip
42
+ pip install setuptools wheel twine cython
43
+ - name : Build and publish
44
+ env :
45
+ TWINE_USERNAME : ${{ secrets.PYPI_USERNAME }}
46
+ TWINE_PASSWORD : ${{ secrets.PYPI_PASSWORD }}
47
+ run : |
48
+ mkdir -p ./dist
49
+ python setup.py sdist # source distribution
50
+ python setup.py bdist_wheel
51
+ twine upload --repository-url https://test.pypi.org/legacy/ dist/*
You can’t perform that action at this time.
0 commit comments