File tree Expand file tree Collapse file tree 1 file changed +35
-5
lines changed Expand file tree Collapse file tree 1 file changed +35
-5
lines changed Original file line number Diff line number Diff line change 1
1
name : Build
2
2
3
- on : [workflow_dispatch]
3
+ on : [workflow_dispatch, release ]
4
4
5
5
jobs :
6
6
build_wheels :
33
33
with :
34
34
path : ./wheelhouse/*.whl
35
35
36
- # - name: Publish a Python distribution to PyPI
37
- # uses: pypa/gh-action-pypi-publish@release/v1
38
- # with:
39
- # password: ${{ secrets.PYPI_API_TOKEN }}
36
+ make_sdist :
37
+ name : Make SDist
38
+ runs-on : ubuntu-latest
39
+ steps :
40
+ - uses : actions/checkout@v3
41
+ with :
42
+ fetch-depth : 0 # Optional, use if you use setuptools_scm
43
+ submodules : true # Optional, use if you have submodules
44
+
45
+ - name : Install setup dependencies
46
+ run : python -m pip install poetry
47
+
48
+ - name : Build SDist
49
+ run : poetry build -f sdist
50
+
51
+ - uses : actions/upload-artifact@v3
52
+ with :
53
+ path : dist/*.tar.gz
54
+
55
+ upload_all :
56
+ needs : [build_wheels, make_sdist]
57
+ runs-on : ubuntu-latest
58
+ if : github.event_name == 'release' && github.event.action == 'published'
59
+ steps :
60
+ - uses : actions/download-artifact@v3
61
+ with :
62
+ name : artifact
63
+ path : dist
64
+
65
+ - name : Publish to PyPI
66
+
67
+ with :
68
+ user : __token__
69
+ password : ${{ secrets.PYPI_API_TOKEN }}
You can’t perform that action at this time.
0 commit comments