Skip to content

Commit

Permalink
Merge pull request #268 from zhang-accounting/264-release-wasm-bindin…
Browse files Browse the repository at this point in the history
…g-when-releasing-a-new-version

chore: release wasm when release zhang
  • Loading branch information
Kilerd authored Mar 26, 2024
2 parents 52eeda1 + 0a8fb52 commit 64a01b9
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -115,3 +115,35 @@ jobs:
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

release-wasm:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions-rust-lang/setup-rust-toolchain@v1

- name: update wasm version
run: sed -i 's/version = "0.1.1"/version = "${{github.ref_name}}"/' Cargo.toml
working-directory: ./bindings/wasm

- uses: jetli/[email protected]
with:
# Optional version of wasm-pack to install(eg. 'v0.9.1', 'latest')
version: 'v0.12.1'

- name: build wasm
run: wasm-pack build
working-directory: ./bindings/wasm

- name: pack wasm
run: wasm-pack pack
working-directory: ./bindings/wasm

- name: setup npm token
run: echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> ~/.npmrc
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

- name: publish to npm
run: wasm-pack build
working-directory: ./bindings/wasm

0 comments on commit 64a01b9

Please sign in to comment.