-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #47 from Revolyssup/upload
Build and upload wasm binaries to latest release
- Loading branch information
Showing
2 changed files
with
24 additions
and
15 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,38 @@ | ||
name: release binaries | ||
|
||
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 | ||
|
||
- uses: actions/upload-artifact@v2 | ||
with: | ||
name: wasm-filters.tar.gz | ||
path: ./wasm-filters.tar.gz | ||
|
||
|
||
|
||
# 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 "" "stable-$tag_name" | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,7 +28,6 @@ for d in */ ; do | |
fi | ||
cd .. | ||
done | ||
cd wasm-filters | ||
tar -czvf wasm-filters.tar.gz ./wasm-filters | ||
|
||
|
||
|