Skip to content

Commit

Permalink
ci: build wasm and javascript index as artifacts of release
Browse files Browse the repository at this point in the history
As a preliminary step to uploading to NPM, we'd like to package the wasm
and test its build process and utility in github releases alone. At this
point, the SDK should be usable from chainlink, just with slightly less
convenience.
  • Loading branch information
tlovell-sxt committed Nov 22, 2024
1 parent ed9beba commit e508d67
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,28 @@ jobs:
github_token: ${{ secrets.GH_TOKEN }}
branch: ${{ github.ref }}

- name: Install stable toolchain
run: curl https://sh.rustup.rs -sSf | bash -s -- -y --profile minimal && source ~/.cargo/env

- name: Install build dependencies
run: export DEBIAN_FRONTEND=non-interactive && sudo apt-get update && sudo apt-get install -y clang lld protobuf-compiler

- name: Install wasm-pack
run: cargo install wasm-pack

- name: Build wasm binary
run: wasm-pack build --release --target deno --no-typescript crates/proof-of-sql-sdk-wasm

- name: Build javascript index
run: |
chmod +x ./node/src/build_index.sh
./node/src/build_index.sh crates/proof-of-sql-sdk-wasm/pkg
- name: Create Release
uses: ncipollo/release-action@v1
with:
tag: ${{ steps.conventional-changelog.outputs.tag }}
body: ${{ steps.conventional-changelog.outputs.changelog }}
token: ${{ secrets.GH_TOKEN }}
artifacts: "node/src/index.js,node/src/sxt_proof_of_sql_sdk_wasm_bg.wasm"
makeLatest: true

0 comments on commit e508d67

Please sign in to comment.