@@ -277,6 +277,31 @@ jobs:
277
277
name : wheel-pypy-${{ matrix.os }}-${{ matrix.target }}-${{ matrix.python-version }}
278
278
path : dist
279
279
280
+ pyodide :
281
+ runs-on : ubuntu-22.04
282
+ steps :
283
+ - uses : actions/checkout@v4
284
+ - uses : dtolnay/rust-toolchain@nightly
285
+ with :
286
+ toolchain : nightly
287
+ targets : wasm32-unknown-emscripten
288
+ - uses : actions/setup-python@v5
289
+ with :
290
+ python-version : 3.12
291
+ - run : |
292
+ pip install pyodide-build>=0.28.0
293
+ echo EMSCRIPTEN_VERSION=$(pyodide config get emscripten_version) >> $GITHUB_ENV
294
+ - uses : mymindstorm/setup-emsdk@v14
295
+ with :
296
+ version : ${{ env.EMSCRIPTEN_VERSION }}
297
+ - run : pyodide build
298
+ working-directory : ./bindings/python
299
+ - name : Upload wheels
300
+ uses : actions/upload-artifact@v4
301
+ with :
302
+ name : wheel-pyodide
303
+ path : dist
304
+
280
305
release :
281
306
name : Release
282
307
runs-on : ubuntu-22.04
@@ -290,6 +315,7 @@ jobs:
290
315
- musllinux
291
316
- musllinux-cross
292
317
- pypy
318
+ - pyodide
293
319
if : " startsWith(github.ref, 'refs/tags/')"
294
320
steps :
295
321
- uses : actions/download-artifact@v4
@@ -300,7 +326,18 @@ jobs:
300
326
mkdir dist
301
327
mv all/*/* dist
302
328
- uses : actions/setup-python@v5
303
- - name : Publish to PyPi
329
+ - name : Extract Version
330
+ run : echo "version=${GITHUB_REF#refs/tags/python-v}" >> $GITHUB_ENV
331
+
332
+ - name : GitHub Release
333
+ uses : softprops/action-gh-release@v2
334
+ with :
335
+ make_latest : false
336
+ draft : true
337
+ name : " [Python] Release ${{ env.version }}"
338
+ files : dist/**
339
+
340
+ - name : Publish to PyPI
304
341
env :
305
342
TWINE_USERNAME : ${{ secrets.PYPI_USERNAME }}
306
343
TWINE_PASSWORD : ${{ secrets.PYPI_PASSWORD }}
0 commit comments