#36 Documentation Issue resolved with addition of an example #20
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build/Release binaries | |
on: | |
release: | |
types: [published] | |
pull_request: | |
branches: | |
- "*" | |
push: | |
branches: | |
- "*" | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Toolchain installation | |
run: sh -c "rustup toolchain install nightly && rustup target add wasm32-unknown-unknown && cargo install wasm-pack" | |
- name: Build binaries | |
run: sh release-binaries.sh | |
# the below step will take place only when there is a release | |
- name: Upload wasm binaries to the latest made release | |
if: github.event_name == 'release' | |
run: | | |
set -x | |
assets=() | |
for asset in ./wasm-filters/*.wasm; do | |
assets+=("-a" "$asset") | |
done | |
tag_name="${GITHUB_REF##*/}" | |
hub release edit "${assets[@]}" -m "" "$tag_name" | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |