Skip to content

Commit 7169dcd

Browse files
committed
Create ci-pyodide-wasm-release.yml
1 parent b9d4ea3 commit 7169dcd

File tree

1 file changed

+43
-0
lines changed

1 file changed

+43
-0
lines changed
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Release Pyodide WASM Wheel
2+
3+
on:
4+
workflow_dispatch:
5+
6+
jobs:
7+
build-and-push:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- name: Checkout IfcOpenShell
11+
uses: actions/checkout@v6
12+
13+
- name: Install uv
14+
uses: astral-sh/setup-uv@v7
15+
16+
- name: Build wheel
17+
working-directory: pyodide
18+
run: uv run pack_wheel.py --build
19+
20+
- name: Find wheel
21+
id: wheel
22+
run: |
23+
WHEEL=$(ls pyodide/dist/ifcopenshell-*.whl)
24+
echo "path=$WHEEL" >> $GITHUB_OUTPUT
25+
echo "name=$(basename $WHEEL)" >> $GITHUB_OUTPUT
26+
27+
- name: Checkout wasm-wheels
28+
uses: actions/checkout@v6
29+
with:
30+
repository: IfcOpenShell/wasm-wheels
31+
path: wasm-wheels
32+
token: ${{ secrets.WASM_WHEELS_TOKEN }}
33+
34+
- name: Commit and push wheel to wasm-wheels
35+
run: |
36+
WHEEL_NAME="${{ steps.wheel.outputs.name }}"
37+
cp "${{ steps.wheel.outputs.path }}" "wasm-wheels/$WHEEL_NAME"
38+
cd wasm-wheels
39+
git config user.name "IfcOpenBot"
40+
git config user.email "ifcopenbot@ifcopenshell.org"
41+
git add "$WHEEL_NAME"
42+
git commit -m "Add $WHEEL_NAME"
43+
git push origin main

0 commit comments

Comments
 (0)