@@ -142,8 +142,22 @@ jobs:
142142 password : ${{ secrets.DOCKERHUB_PASSWORD }}
143143 dockerfile : Dockerfile
144144 tags : " latest,${{ env.STATE_RELEASE_VERSION }}"
145+ make_sdist :
146+ needs : release-please
147+ if : ${{ needs.release-please.outputs.release_created }}
148+ name : Make SDist
149+ runs-on : ubuntu-latest
150+ steps :
151+ - uses : actions/checkout@v3
152+
153+ - name : Build SDist
154+ run : pipx run build --sdist
145155
146- pypi-deploy :
156+ - uses : actions/upload-artifact@v3
157+ with :
158+ path : dist/*.tar.gz
159+
160+ build_wheels :
147161 needs : release-please
148162 if : ${{ needs.release-please.outputs.release_created }}
149163 name : Build wheels
@@ -161,11 +175,21 @@ jobs:
161175 CIBW_ARCHS_MACOS : x86_64 universal2
162176 CIBW_BUILD : " cp36-* cp37-* cp38-* cp39-* cp310*"
163177 CIBW_BEFORE_BUILD : " pip install numpy cython" # make sure numpy is the same version as required by LS
164-
165- - name : Publish wheels to PyPI
166- env :
167- TWINE_USERNAME : ${{ secrets.PYPI_USERNAME }}
168- TWINE_PASSWORD : ${{ secrets.PYPI_PASSWORD }}
169- run : |
170- pip install twine
171- python -m twine upload ./wheelhouse/*.whl
178+ - uses : actions/upload-artifact@v3
179+ with :
180+ path : ./wheelhouse/*.whl
181+
182+ upload_to_pypi :
183+ needs : [build_wheels,make_sdist]
184+ runs-on : ubuntu-latest
185+ if : ${{ needs.release-please.outputs.release_created }}
186+ steps :
187+ - uses : actions/download-artifact@v3
188+ with :
189+ name : artifact
190+ path : dist
191+ 192+ with :
193+ user : ${{ secrets.PYPI_USERNAME }}
194+ password : ${{ secrets.PYPI_PASSWORD }}
195+
0 commit comments