Skip to content

Commit 40dc9b3

Browse files
committed
ci: add wasm build for web
1 parent b0bac08 commit 40dc9b3

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

.github/workflows/build.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,15 @@ jobs:
5959

6060
- name: Build
6161
run: |
62+
rustup toolchain install nightly
63+
rustup +nightly component add rust-src
64+
rustup +nightly target add wasm32-unknown-unknown
65+
66+
cargo install wasm-pack
67+
cargo install flutter_rust_bridge_codegen
68+
6269
flutter pub get
70+
flutter_rust_bridge_codegen build-web
6371
flutter build web
6472
6573
build-android:

.github/workflows/release.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,15 @@ jobs:
4545

4646
- name: Build
4747
run: |
48+
rustup toolchain install nightly
49+
rustup +nightly component add rust-src
50+
rustup +nightly target add wasm32-unknown-unknown
51+
52+
cargo install wasm-pack
53+
cargo install flutter_rust_bridge_codegen
54+
4855
flutter pub get
56+
flutter_rust_bridge_codegen build-web
4957
flutter build web --build-name=$GITHUB_REF_NAME --build-number=$GITHUB_RUN_NUMBER
5058
cd build/web && tar -zcvf ../../${{ env.APP_NAME }}-web-${{ github.ref_name }}.tar.gz ./*
5159

0 commit comments

Comments
 (0)