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 }}