Skip to content

Commit 4e4cc1e

Browse files
author
evgenii
committed
CI: skip pyodide wheel on TestPyPI upload
1 parent 9f9013e commit 4e4cc1e

File tree

1 file changed

+19
-5
lines changed

1 file changed

+19
-5
lines changed

.github/workflows/wheels.yml

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -231,8 +231,13 @@ jobs:
231231
- build_wheels
232232
runs-on: ubuntu-latest
233233

234+
# ---------- current TEST settings ----------
234235
environment:
235-
name: testpypi # ← keep for dry-run; change to pypi before PR
236+
name: testpypi # keep while testing
237+
# ---------- FINAL settings (uncomment) ----------
238+
# environment:
239+
# name: pypi # ← enable for PyPI
240+
236241
permissions:
237242
id-token: write # OIDC token for Trusted Publishing
238243
contents: read
@@ -244,17 +249,26 @@ jobs:
244249
with:
245250
path: dist # all files land in ./dist/**
246251

247-
# 2. Move wheels & sdist into a flat 'upload' dir (action expects that)
252+
# 2. Move wheels & sdist into a flat 'upload' dir (skip Pyodide wheels)
248253
- name: Collect files
249254
run: |
250255
mkdir -p upload
251-
find dist -name '*.whl' -exec mv {} upload/ \;
256+
# skip anything containing 'pyodide' in the filename
257+
find dist -name '*pyodide*.whl' -prune -o \
258+
-name '*.whl' -exec mv {} upload/ \;
252259
find dist -name '*.tar.gz' -exec mv {} upload/ \;
253260
254-
# 3. Publish to **Test PyPI** using Trusted Publishing
261+
# 3. Publish to TestPyPI using Trusted Publishing
255262
- name: Publish to TestPyPI (Trusted Publishing)
256263
uses: pypa/gh-action-pypi-publish@release/v1
257264
with:
258-
repository-url: https://test.pypi.org/legacy/
265+
repository-url: https://test.pypi.org/legacy/ # test endpoint
259266
packages-dir: upload
260267
skip-existing: true
268+
269+
# ---------- FINAL publish block (uncomment, remove test one above) ----------
270+
# - name: Publish to PyPI (Trusted Publishing) # ← enable for PyPI
271+
# uses: pypa/gh-action-pypi-publish@release/v1
272+
# with:
273+
# repository-url: https://upload.pypi.org/legacy/ # ← production endpoint
274+
# packages-dir: upload

0 commit comments

Comments
 (0)