15
15
runs-on : ubuntu-latest
16
16
steps :
17
17
- uses : actions/checkout@v3
18
+ with :
19
+ fetch-depth : 0
18
20
- name : Install Rust
19
21
uses : dtolnay/rust-toolchain@stable
20
22
with :
@@ -24,16 +26,18 @@ jobs:
24
26
shell : bash
25
27
run : |
26
28
rustup target add wasm32-wasi
29
+ - name : Setup Wasmer
30
+ uses : wasmerio/setup-wasmer@v1
27
31
- name : Build cloudcompiler.wasm
28
32
shell : bash
29
33
run : |
30
- cargo build --release --target wasm32-wasi &&
31
- mkdir target/release/cloudcompiler &&
32
- cp target/release/wasmer.wasm target/release/cloudcompiler/cloudcompiler.wasm &&
33
- cat << EOF > target/release/cloudcompiler/wapm.toml
34
+ make build-wasmer-wasm &&
35
+ mkdir target/wasm32-wasi/ release/cloudcompiler
36
+ cp target/wasm32-wasi/ release/wasmer-compiler .wasm target/wasm32-wasi /release/cloudcompiler/cloudcompiler.wasm &&
37
+ cat << EOF > target/wasm32-wasi/ release/cloudcompiler/wapm.toml
34
38
[package]
35
39
name = "${{ secrets.WAPM_DEV_USERNAME }}/cloudcompiler"
36
- version = "$(git tag | tail -n1) "
40
+ version = "0.1.0 "
37
41
description = "cloudcompiler.wasm"
38
42
license = "MIT"
39
43
repository = "https://github.com/wasmerio/wasmer"
49
53
[[command]]
50
54
name = "cloudcompiler"
51
55
module = "cloudcompiler"
52
- EOF
56
+ EOF
57
+ - name : Fix wapm.toml version
58
+ run : |
59
+ echo $(git tag | tail -n1) > ./version.txt
60
+ v=$(git describe --tags --abbrev=0) && \
61
+ echo "version = ${v}" &&
62
+ sed -i "s/version = \".*\"/${v}/g" target/wasm32-wasi/release/cloudcompiler/wapm.toml \
63
+ - name : Build cloudcompiler.wasm
64
+ shell : bash
65
+ run : |
66
+ git tag &&
67
+ cat target/wasm32-wasi/release/cloudcompiler/wapm.toml &&
68
+ echo "ls" &&
69
+ ls target/wasm32-wasi/release/cloudcompiler
70
+ - name : Publish to WAPM
71
+ uses : wasmerio/wapm-publish@v1
72
+ with :
73
+ registry : https://registry.wapm.dev
74
+ directory : target/wasm32-wasi/release/cloudcompiler
75
+ username : ${{ secrets.WAPM_DEV_USERNAME }}
76
+ password : ${{ secrets.WAPM_DEV_PASSWORD }}
0 commit comments