File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11name : Build
22
3- on : [push, pull_request]
3+ on : [push, pull_request, workflow_call ]
44
55jobs :
66 build_wheels :
4141 - uses : actions/upload-artifact@v3
4242 with :
4343 path : dist/*.tar.gz
44-
45- upload_pypi :
46- needs : [build_wheels, build_sdist]
47- runs-on : ubuntu-latest
48- if : github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
49- steps :
50- - uses : actions/download-artifact@v3
51- with :
52- name : artifact
53- path : dist
54-
55- - uses : pypa/gh-action-pypi-publish@v1.5.2
56- with :
57- user : __token__
58- password : ${{ secrets.pypi_password }}
Original file line number Diff line number Diff line change 1+ name : Release
2+
3+ on :
4+ push :
5+ tags :
6+ - " v*.*.*"
7+
8+ jobs :
9+ build :
10+ uses : ./.github/workflows/build.yml
11+ create_release :
12+ needs : [build]
13+ runs-on : ubuntu-latest
14+ steps :
15+ - name : Checkout
16+ uses : actions/checkout@v2
17+ - name : Download wheels
18+ uses : actions/download-artifact@v3
19+ with :
20+ name : artifact
21+ path : dist
22+ - name : Release
23+ uses : softprops/action-gh-release@v1
24+ with :
25+ body_path : ./CHANGELOG.md
26+ files : " dist/*"
27+ upload_pypi :
28+ needs : [build, create_release]
29+ runs-on : ubuntu-latest
30+ steps :
31+ - name : Download wheels
32+ uses : actions/download-artifact@v3
33+ with :
34+ name : artifact
35+ path : dist
36+ - name : Publish to pipy
37+ uses : pypa/gh-action-pypi-publish@v1.5.2
38+ with :
39+ user : __token__
40+ password : ${{ secrets.pypi_password }}
You can’t perform that action at this time.
0 commit comments