Skip to content

Merge pull request #54 from abhijeetgauravm/master #19

Merge pull request #54 from abhijeetgauravm/master

Merge pull request #54 from abhijeetgauravm/master #19

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 }}