From 37eb2a041a62935f1a92a91a2fc823905c44fb36 Mon Sep 17 00:00:00 2001 From: ashish Date: Sat, 26 Feb 2022 03:11:25 +0530 Subject: [PATCH 1/2] Build and upload wasm binaries to latest release Signed-off-by: ashish --- .github/workflows/release-binaries.yml | 29 +++++++++++++++++++------- release-binaries.sh | 3 +-- 2 files changed, 22 insertions(+), 10 deletions(-) diff --git a/.github/workflows/release-binaries.yml b/.github/workflows/release-binaries.yml index 4cf80e5..8b7802b 100644 --- a/.github/workflows/release-binaries.yml +++ b/.github/workflows/release-binaries.yml @@ -1,17 +1,21 @@ -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 @@ -19,10 +23,19 @@ jobs: - 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 "" "$tag_name" + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file diff --git a/release-binaries.sh b/release-binaries.sh index 0d1461e..7c0c444 100644 --- a/release-binaries.sh +++ b/release-binaries.sh @@ -28,7 +28,6 @@ for d in */ ; do fi cd .. done -cd wasm-filters -tar -czvf wasm-filters.tar.gz ./wasm-filters + From 58bdd3fdb874bc8b3c152443268d70a4b6ac51c7 Mon Sep 17 00:00:00 2001 From: Lee Calcote Date: Fri, 25 Feb 2022 16:22:52 -0600 Subject: [PATCH 2/2] Update release-binaries.yml --- .github/workflows/release-binaries.yml | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/.github/workflows/release-binaries.yml b/.github/workflows/release-binaries.yml index 8b7802b..5dfb6e8 100644 --- a/.github/workflows/release-binaries.yml +++ b/.github/workflows/release-binaries.yml @@ -1,8 +1,5 @@ name: Build/Release binaries - on: - release: - types: [published] pull_request: branches: - "*" @@ -34,8 +31,8 @@ jobs: assets+=("-a" "$asset") done tag_name="${GITHUB_REF##*/}" - hub release edit "${assets[@]}" -m "" "$tag_name" + hub release edit "${assets[@]}" -m "" "stable-$tag_name" env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - \ No newline at end of file +