Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 4b9b43f

Browse files
committed
ci: Add the release steps to publish to PyPI
1 parent 26dfad2 commit 4b9b43f

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

.github/workflows/cibuildwheel.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,3 +191,25 @@ jobs:
191191
name: cibw-wheels-${{ runner.os }}-${{ matrix.cibw_archs }}
192192
path: ./wheelhouse/*.whl
193193
if-no-files-found: error
194+
195+
publish:
196+
if: github.event_name == 'release' && github.event.action == 'published'
197+
name: Upload release to PyPI
198+
needs: [build_sdist, build_wheels]
199+
runs-on: ubuntu-latest
200+
environment: release
201+
permissions:
202+
id-token: write
203+
steps:
204+
- name: Download packages
205+
uses: actions/download-artifact@v4
206+
with:
207+
pattern: cibw-*
208+
path: dist
209+
merge-multiple: true
210+
211+
- name: Print out packages
212+
run: ls dist
213+
214+
- name: Publish package distributions to PyPI
215+
uses: pypa/gh-action-pypi-publish@b7f401de30cb6434a1e19f805ff006643653240e # v1.8.10

0 commit comments

Comments
 (0)