-
Notifications
You must be signed in to change notification settings - Fork 19
61 lines (50 loc) · 1.31 KB
/
release-wasm-bindings.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
name: Release WASM Bindings
on:
workflow_dispatch:
env:
CARGO_TERM_COLOR: always
jobs:
release:
permissions:
id-token: write
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Update rust toolchains, add target
run: |
rustup update
- name: Cache
uses: Swatinem/rust-cache@v2
with:
workspaces: |
.
bindings_wasm
- name: Install wasm-bindgen and wasm-opt
uses: taiki-e/install-action@v2
with:
tool: wasm-bindgen, wasm-opt
- name: Setup node
uses: actions/setup-node@v4
with:
node-version-file: ".node-version"
cache-dependency-path: "bindings_wasm/yarn.lock"
cache: "yarn"
env:
SKIP_YARN_COREPACK_CHECK: "1"
- name: Enable corepack
run: corepack enable
- name: Install dependencies
working-directory: bindings_wasm
run: |
yarn
- name: Build
working-directory: bindings_wasm
run: yarn build
- name: Publish to NPM
uses: JS-DevTools/npm-publish@v3
with:
token: ${{ secrets.NPM_TOKEN }}
package: bindings_wasm
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}