-
Notifications
You must be signed in to change notification settings - Fork 37
41 lines (34 loc) · 956 Bytes
/
release-binaries.yml
File metadata and controls
41 lines (34 loc) · 956 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
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 }}