Skip to content

Commit 59e717a

Browse files
committed
ci: Add publish statge for wasm
1 parent 0f670a0 commit 59e717a

File tree

1 file changed

+23
-1
lines changed

1 file changed

+23
-1
lines changed

.github/workflows/wasm.yaml

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ permissions:
1414

1515
jobs:
1616
wasm-binding:
17-
name: Test WASM Binding
17+
name: Build and test WASM Binding
1818
runs-on: ubuntu-latest
1919
steps:
2020
- uses: actions/checkout@v4
@@ -51,3 +51,25 @@ jobs:
5151
path: bindings/wasm/pkg
5252
if-no-files-found: error
5353

54+
publish:
55+
name: Publish WASM Package
56+
if: startsWith(github.ref, 'refs/tags/v')
57+
needs: wasm-binding
58+
runs-on: ubuntu-latest
59+
steps:
60+
- uses: actions/checkout@v4
61+
62+
- name: Setup Node.js
63+
uses: actions/setup-node@v4
64+
with:
65+
node-version: 22
66+
registry-url: 'https://registry.npmjs.org'
67+
68+
- name: Get version
69+
id: version
70+
run: echo "VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_OUTPUT
71+
72+
- name: Publish WASM package
73+
working-directory: bindings/wasm/pkg
74+
run: npm publish --access public
75+

0 commit comments

Comments
 (0)