From 39ca5b16d1bd6995f65fbcab74ed15192c19d411 Mon Sep 17 00:00:00 2001 From: Patrick Lu Date: Sat, 29 Nov 2025 11:43:55 -0800 Subject: [PATCH] fix: Add WASM artifact verification before publish Add verification step in release workflow to ensure all WASM artifacts are present before publishing to npm. This prevents incomplete packages from being published if any matrix build job fails. The verification checks for WASM files from all four bands: - v0_82_87 - v26 - v42 - v48 If any band is missing artifacts, the workflow will fail with a clear error message before reaching the publish step. This replaces the silent failure behavior of the previous "cp ... || true" command. --- .github/workflows/release.yml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 151eef2..9ab0319 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -192,6 +192,34 @@ jobs: done ls -la swc/ + - name: Verify all WASM files present + run: | + echo "Verifying WASM artifacts for all bands..." + MISSING_BANDS="" + BANDS=("v0_82_87" "v26" "v42" "v48") + + for band in "${BANDS[@]}"; do + if ! ls swc/*${band}*.wasm 1>/dev/null 2>&1; then + echo "ERROR: Missing WASM file for band: $band" + MISSING_BANDS="$MISSING_BANDS $band" + else + echo "✓ Found WASM file(s) for band: $band" + ls swc/*${band}*.wasm + fi + done + + if [ -n "$MISSING_BANDS" ]; then + echo "" + echo "FATAL: The following bands are missing WASM artifacts:$MISSING_BANDS" + echo "This indicates one or more matrix build jobs failed." + echo "Cannot proceed with publish - package would be incomplete." + exit 1 + fi + + echo "" + echo "✓ All WASM bands verified successfully" + echo "Total WASM files: $(ls swc/*.wasm | wc -l)" + - name: Update package version for release env: RELEASE_VERSION: ${{ needs.check-version.outputs.release_version }}