File tree 1 file changed +58
-0
lines changed
1 file changed +58
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Publish Xvec to PyPI
2
+
3
+ on :
4
+ push :
5
+ tags :
6
+ - " v*"
7
+
8
+ jobs :
9
+ build-n-publish :
10
+ name : Build and publish Xvec to PyPI
11
+ runs-on : ubuntu-18.04
12
+
13
+ steps :
14
+ - uses : actions/checkout@master
15
+
16
+ - name : Set up Python
17
+ uses : actions/setup-python@v2
18
+ with :
19
+ python-version : " 3.x"
20
+
21
+ - name : Build a binary wheel and a source tarball
22
+ run : |
23
+ python -m pip install --upgrade build
24
+ python -m build
25
+
26
+ - name : Publish distribution to PyPI
27
+ uses : pypa/gh-action-pypi-publish@master
28
+ with :
29
+ user : __token__
30
+ password : ${{ secrets.pypi_password }}
31
+
32
+ - name : Create GitHub Release
33
+ id : create_release
34
+ uses : actions/create-release@v1
35
+ env :
36
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
37
+ with :
38
+ tag_name : ${{ github.ref }}
39
+ release_name : Version ${{ github.ref }}
40
+ draft : false
41
+ prerelease : false
42
+
43
+ - name : Get Asset name
44
+ run : |
45
+ export PKG=$(ls dist/ | grep tar)
46
+ set -- $PKG
47
+ echo "name=$1" >> $GITHUB_ENV
48
+
49
+ - name : Upload Release Asset (sdist) to GitHub
50
+ id : upload-release-asset
51
+ uses : actions/upload-release-asset@v1
52
+ env :
53
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
54
+ with :
55
+ upload_url : ${{ steps.create_release.outputs.upload_url }}
56
+ asset_path : dist/${{ env.name }}
57
+ asset_name : ${{ env.name }}
58
+ asset_content_type : application/zip
You can’t perform that action at this time.
0 commit comments