Skip to content

Commit 46be943

Browse files
shaanmajidntBre
andauthored
Exclude WASM artifacts from GitHub releases (#23221)
## Summary Fixes #23127. The `release.yml` workflow downloads artifacts using `pattern: artifacts-*` with `merge-multiple: true`. The three WASM build targets (web, bundler, nodejs) were uploaded as `artifacts-wasm-{target}`, matching that glob. Since all three contain identically-named files, they silently overwrote each other during the merge, making the released WASM assets non-deterministic. Renaming the artifacts from `artifacts-wasm-*` to `wasm-npm-*` excludes them from the `artifacts-*` glob in `release.yml`. Notably, the npm publish workflow is unaffected (it downloads each target by exact artifact name and was never subject to the merge conflict). ## Test Plan N/A :p Happy to investigate a test publish on my fork if anyone feels strongly about this. However, npm does not appear to have a test registry like PyPI -- and in any event testing seemed a bit involved -- so I didn't rush to investigate this before review. --------- Co-authored-by: Brent Westbrook <36778786+ntBre@users.noreply.github.com>
1 parent 6ded4be commit 46be943

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

.github/workflows/build-wasm.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,5 +54,6 @@ jobs:
5454
- name: "Upload wasm artifact"
5555
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
5656
with:
57-
name: artifacts-wasm-${{ matrix.target }}
57+
# Avoid prefixing the name with `artifacts-` here to exclude it from the GitHub release.
58+
name: wasm-npm-${{ matrix.target }}
5859
path: crates/ruff_wasm/pkg

.github/workflows/publish-wasm.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
steps:
2525
- uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0
2626
with:
27-
name: artifacts-wasm-${{ matrix.target }}
27+
name: wasm-npm-${{ matrix.target }}
2828
path: pkg
2929
- uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0
3030
with:

0 commit comments

Comments
 (0)