From 6fdebcfac40b29fb90ca4560baefecf7c22df0fd Mon Sep 17 00:00:00 2001 From: Eguzki Astiz Lezaun Date: Tue, 23 Apr 2024 13:03:58 +0200 Subject: [PATCH] publish binary on release --- .github/workflows/release.yaml | 36 ++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 .github/workflows/release.yaml diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml new file mode 100644 index 00000000..a0ad4771 --- /dev/null +++ b/.github/workflows/release.yaml @@ -0,0 +1,36 @@ +--- + +name: Release + +on: + release: + types: [created] + +permissions: + contents: write + +jobs: + upload-assets: + name: Release Wasm Binary + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: stable + override: true + target: wasm32-unknown-unknown + - uses: arduino/setup-protoc@v1 + with: + version: '3.x' + - uses: actions-rs/cargo@v1 + with: + command: build + args: --release --target wasm32-unknown-unknown + - uses: shogo82148/actions-upload-release-asset@v1 + with: + upload_url: ${{ github.event.release.upload_url }} + asset_path: target/wasm32-unknown-unknown/release/wasm_shim.wasm + asset_content_type: application/wasm + asset_name: kuadrant-ratelimit-wasm-${{ github.ref_name }}