Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit c8f0c06

Browse filesBrowse files
authored
Merge pull request #27563 from QuLogic/pypi-publishing
Enable PyPI publishing from GitHub Actions
2 parents 075c5bc + 4b9b43f commit c8f0c06
Copy full SHA for c8f0c06

File tree

Expand file treeCollapse file tree

1 file changed

+25
-3
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+25
-3
lines changed

‎.github/workflows/cibuildwheel.yml

Copy file name to clipboardExpand all lines: .github/workflows/cibuildwheel.yml
+25-3Lines changed: 25 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ jobs:
7171
- name: Upload sdist result
7272
uses: actions/upload-artifact@v4
7373
with:
74-
name: sdist
74+
name: cibw-sdist
7575
path: dist/*.tar.gz
7676
if-no-files-found: error
7777

@@ -142,7 +142,7 @@ jobs:
142142
- name: Download sdist
143143
uses: actions/download-artifact@v4
144144
with:
145-
name: sdist
145+
name: cibw-sdist
146146
path: dist/
147147

148148
- name: Build wheels for CPython 3.12
@@ -188,6 +188,28 @@ jobs:
188188

189189
- uses: actions/upload-artifact@v4
190190
with:
191-
name: wheels
191+
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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.