Skip to content

Commit ccd7608

Browse files
committed
Automate wasm wheel upload to gh pages
1 parent 754b31e commit ccd7608

File tree

1 file changed

+20
-5
lines changed

1 file changed

+20
-5
lines changed

.github/workflows/wasm.yml

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,26 @@ jobs:
4949
# Testing is automatically made by cibuildwheel
5050
run: cibuildwheel --platform pyodide
5151

52-
- name: Upload wheels
53-
uses: actions/upload-artifact@v5
54-
with:
55-
name: wheels-wasm-${{ matrix.os }}-${{ matrix.p_ver }}
56-
path: ./wheelhouse/*.whl
52+
- name: Move wheels into /wheels directory for GitHub Pages and trigger gh pages redeploy
53+
if: startsWith(github.ref, 'refs/tags/')
54+
run: |
55+
mkdir -p wheels
56+
rm -f wheels/*.whl || true
57+
cp wheelhouse/*.whl wheels/
58+
echo "Copied wheels:"
59+
ls -lh wheels/
60+
git config user.name "GitHub Actions"
61+
git config user.email "[email protected]"
62+
63+
git add wheels
64+
# Do nothing if no changes
65+
if git diff --cached --quiet; then
66+
echo "No new wheels to commit"
67+
exit 0
68+
fi
69+
70+
git commit -m "Update wheels for release ${{ github.ref_name }}"
71+
git push
5772
5873
# This is not working yet
5974
# - name: Upload wheel to release

0 commit comments

Comments
 (0)