File tree Expand file tree Collapse file tree 1 file changed +20
-7
lines changed Expand file tree Collapse file tree 1 file changed +20
-7
lines changed Original file line number Diff line number Diff line change 20
20
21
21
env :
22
22
VERSION : 0.1.${{ github.run_number }}
23
+ CARGO_TERM_COLOR : always
23
24
24
25
jobs :
25
26
build-wasm :
@@ -34,22 +35,34 @@ jobs:
34
35
with :
35
36
version : ' latest'
36
37
37
- - name : Install latest nightly
38
- uses : actions-rs/toolchain@v1
38
+ - name : Install rust toolchain nightly
39
+ run : rustup override set nightly-2024-04-17
40
+
41
+ - name : Output rust version for verification
42
+ run : rustup --version
43
+
44
+ - name : Add wasm32 target
45
+ run : rustup target add wasm32-unknown-unknown
46
+
47
+ - name : Cache dependencies
48
+ uses : actions/cache@v4
39
49
with :
40
- toolchain : nightly-2024-04-16
41
- override : true
42
- components : rust-src
50
+ path : |
51
+ ~/.cargo/registry
52
+ ~/.cargo/git
53
+ wasm_binding/target
54
+ key : ${{ runner.os }}-cargo-wasm-${{ hashFiles('**/Cargo.lock') }}
43
55
44
56
- name : Build
45
57
run : |
46
58
cd wasm_binding && wasm-pack build --target web --release
47
59
48
- - name : version
60
+ - name : Add version info
49
61
run : |
50
62
echo ${VERSION}>wasm_binding/pkg/version.txt
51
63
52
- - uses : actions/upload-artifact@v4
64
+ - name : Upload wasm artifact
65
+ uses : actions/upload-artifact@v4
53
66
with :
54
67
name : wasm
55
68
path : wasm_binding/pkg
You can’t perform that action at this time.
0 commit comments