Skip to content

Commit 6f6216b

Browse files
committed
ci: Add the release steps to publish to PyPI
1 parent 5cc426b commit 6f6216b

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

.github/workflows/cibuildwheel.yml

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

0 commit comments

Comments
 (0)