Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
84 changes: 36 additions & 48 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -217,42 +217,42 @@ jobs:
if-no-files-found: error

# ---------------------------------------------------------------------------
# build-wasm — wasm package artifact built in parallel with native artifacts
# build-wasm — disabled
# ---------------------------------------------------------------------------
build-wasm:
needs: [context]
name: "Build rivetkit-wasm"
runs-on: depot-ubuntu-24.04-8
permissions:
contents: read
steps:
- uses: actions/checkout@v4
with:
lfs: ${{ needs.context.outputs.trigger == 'release' }}
- run: corepack enable
- uses: actions/setup-node@v4
with:
node-version: "22"
cache: pnpm
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: stable
target: wasm32-unknown-unknown
rustflags: ""
- uses: Swatinem/rust-cache@v2
with:
shared-key: "rivetkit-wasm-publish"
cache-on-failure: true
- name: Install wasm package dependencies
run: pnpm install --frozen-lockfile --filter=@rivetkit/rivetkit-wasm
- name: Build wasm package
run: pnpm --filter=@rivetkit/rivetkit-wasm build
- name: Upload wasm package artifact
uses: actions/upload-artifact@v4
with:
name: wasm-package
path: rivetkit-typescript/packages/rivetkit-wasm/pkg
if-no-files-found: error
# build-wasm:
# needs: [context]
# name: "Build rivetkit-wasm"
# runs-on: depot-ubuntu-24.04-8
# permissions:
# contents: read
# steps:
# - uses: actions/checkout@v4
# with:
# lfs: ${{ needs.context.outputs.trigger == 'release' }}
# - run: corepack enable
# - uses: actions/setup-node@v4
# with:
# node-version: "22"
# cache: pnpm
# - uses: actions-rust-lang/setup-rust-toolchain@v1
# with:
# toolchain: stable
# target: wasm32-unknown-unknown
# rustflags: ""
# - uses: Swatinem/rust-cache@v2
# with:
# shared-key: "rivetkit-wasm-publish"
# cache-on-failure: true
# - name: Install wasm package dependencies
# run: pnpm install --frozen-lockfile --filter=@rivetkit/rivetkit-wasm
# - name: Build wasm package
# run: pnpm --filter=@rivetkit/rivetkit-wasm build
# - name: Upload wasm package artifact
# uses: actions/upload-artifact@v4
# with:
# name: wasm-package
# path: rivetkit-typescript/packages/rivetkit-wasm/pkg
# if-no-files-found: error

# ---------------------------------------------------------------------------
# docker-images — per-arch runtime images pushed to Docker Hub
Expand Down Expand Up @@ -319,12 +319,11 @@ jobs:
# publish — npm publish + R2 upload + Docker manifest + release tail
# ---------------------------------------------------------------------------
publish:
needs: [context, build, build-wasm, docker-images]
needs: [context, build, docker-images]
name: "Publish"
if: |
!cancelled() &&
needs.build.result == 'success' &&
needs.build-wasm.result == 'success' &&
needs.docker-images.result == 'success'
runs-on: depot-ubuntu-24.04-8
permissions:
Expand Down Expand Up @@ -364,17 +363,6 @@ jobs:
path: engine-artifacts
pattern: engine-*
merge-multiple: true
- name: Download wasm package artifact
uses: actions/download-artifact@v4
with:
name: wasm-package
path: rivetkit-typescript/packages/rivetkit-wasm/pkg
- name: Validate wasm package artifact
run: |
test -f rivetkit-typescript/packages/rivetkit-wasm/pkg/rivetkit_wasm.js
test -f rivetkit-typescript/packages/rivetkit-wasm/pkg/rivetkit_wasm.d.ts
test -f rivetkit-typescript/packages/rivetkit-wasm/pkg/rivetkit_wasm_bg.wasm

- name: Place native binaries in platform packages
run: |
NATIVE_DIR=rivetkit-typescript/packages/rivetkit-napi
Expand Down
8 changes: 5 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,10 @@
"@codemirror/view": "6.38.2",
"@codemirror/autocomplete": "6.18.7",
"@codemirror/commands": "6.8.1",
"@codemirror/lint": "6.8.5",
"wasm-pack": "=0.13.1"
"@codemirror/lint": "6.8.5"
},
"patchedDependencies": {
"wasm-pack@0.14.0": "patches/wasm-pack@0.14.0.patch"
}
}
}
}
13 changes: 13 additions & 0 deletions patches/wasm-pack@0.14.0.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/binary.js b/binary.js
index 7f0472a1f80325d4b75860f0ec9f784779a90c01..f9d1fae49b5bb6dd6baa1a8e268c8aa930fe299a 100644
--- a/binary.js
+++ b/binary.js
@@ -31,7 +31,7 @@ const getPlatform = () => {
const getBinary = () => {
const platform = getPlatform();
const version = require("./package.json").version;
- const author = "drager";
+ const author = "wasm-bindgen";
const name = "wasm-pack";
const url = `https://github.com/${author}/${name}/releases/download/v${version}/${name}-v${version}-${platform}.tar.gz`;
return new Binary(platform === windows ? "wasm-pack.exe" : "wasm-pack", url, {
11 changes: 8 additions & 3 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading