Skip to content
forked from madler/zlib

Commit 3d3aa29

Browse files
committed
fix: use correct CDN URL pattern for R2 deployment
Changes: - Path: zlib@{version}/side.wasm (using @ separator) - CDN URL: wasm.discere.cloud/zlib@v1.4.2/side.wasm - SIDE_MODULE only (MAIN for testing/NPM only) - Bucket: discere-os-wasm-production (correct bucket name)
1 parent 0e10f81 commit 3d3aa29

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

.github/workflows/wasm-ci.yml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -138,15 +138,16 @@ jobs:
138138
VERSION="${{ steps.release-version.outputs.VERSION }}"
139139
SHA="${{ steps.sha.outputs.sha }}"
140140
141-
# Deploy to versioned path (immutable)
142-
wrangler r2 object put discere-os-wasm-production/zlib/${VERSION}/zlib-side.wasm \
141+
# Deploy SIDE_MODULE to versioned path (immutable)
142+
# Pattern: /zlib@v1.4.2/side.wasm (not repeating .wasm in library name)
143+
wrangler r2 object put discere-os-wasm-production/zlib@${VERSION}/side.wasm \
143144
--remote \
144145
--file=install/wasm/zlib-side.wasm \
145146
--content-type=application/wasm \
146147
--cache-control="public, max-age=31536000, immutable"
147148
148149
# Deploy to SHA path (content-addressable)
149-
wrangler r2 object put discere-os-wasm-production/zlib/sha-${SHA:0:7}/zlib-side.wasm \
150+
wrangler r2 object put discere-os-wasm-production/zlib@sha-${SHA:0:7}/side.wasm \
150151
--remote \
151152
--file=install/wasm/zlib-side.wasm \
152153
--content-type=application/wasm \
@@ -159,7 +160,7 @@ jobs:
159160
run: |
160161
sleep 15
161162
VERSION="${{ steps.release-version.outputs.VERSION }}"
162-
curl -I "https://wasm.discere.cloud/zlib/${VERSION}/zlib-side.wasm" || exit 1
163+
curl -I "https://wasm.discere.cloud/zlib@${VERSION}/side.wasm" || exit 1
163164
echo "✅ Cloudflare R2 deployment verified"
164165
165166
deploy-cloudflare-snapshot:
@@ -205,7 +206,10 @@ jobs:
205206
run: |
206207
VERSION="${{ steps.version.outputs.VERSION }}"
207208
208-
wrangler r2 object put discere-os-wasm-production/zlib/${VERSION}/zlib-side.wasm \
209+
# Deploy SIDE_MODULE only (MAIN_MODULE for testing/NPM only)
210+
# Pattern: /zlib@sha-abc123/side.wasm
211+
# CDN URL: wasm.discere.cloud/zlib@sha-abc123/side.wasm
212+
wrangler r2 object put discere-os-wasm-production/zlib@${VERSION}/side.wasm \
209213
--remote \
210214
--file=install/wasm/zlib-side.wasm \
211215
--content-type=application/wasm \

0 commit comments

Comments
 (0)