diff --git a/.github/workflows/release-binaries.yml b/.github/workflows/release-binaries.yml index 4cf80e5..5dfb6e8 100644 --- a/.github/workflows/release-binaries.yml +++ b/.github/workflows/release-binaries.yml @@ -1,17 +1,18 @@ -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 +20,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 - - \ No newline at end of file + + # 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 }} + + 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 +