File tree Expand file tree Collapse file tree 1 file changed +23
-4
lines changed
Expand file tree Collapse file tree 1 file changed +23
-4
lines changed Original file line number Diff line number Diff line change 1- name : publish-pypi
1+ name : build-wheels
22
33on :
44 push :
5+ branches :
6+ - main
57 tags :
6- - ' v*'
8+ - ' v*'
9+ workflow_dispatch :
710
811jobs :
912 linux-wheels :
9295 name : windows-${{ matrix.python-version }}-wheel
9396 path : target/wheels
9497
95- push :
98+ collect-wheels :
9699 needs : [osx-wheels, windows-wheels, linux-wheels]
97100 runs-on : ubuntu-latest
98101 steps :
@@ -121,8 +124,24 @@ jobs:
121124 - run : mv ./windows-3.8-wheel/* wheels
122125 - run : mv ./windows-3.7-wheel/* wheels
123126
127+ - name : Upload wheels as artifact
128+ uses : actions/upload-artifact@v4
129+ with :
130+ name : all-wheels
131+ path : wheels/
132+ retention-days : 7
133+
134+ publish-pypi :
135+ needs : [collect-wheels]
136+ runs-on : ubuntu-latest
137+ if : startsWith(github.ref, 'refs/tags/v')
138+ steps :
139+ - uses : actions/download-artifact@v4
140+ with :
141+ name : all-wheels
142+ path : wheels/
124143
125- - name : Publish a Python distribution to PyPI
144+ - name : Publish to PyPI
126145 uses : pypa/gh-action-pypi-publish@release/v1
127146 with :
128147 password : ${{ secrets.PYPI }}
You can’t perform that action at this time.
0 commit comments