From d9d102530ece4c661205e9e9ae271b420fa5c5f5 Mon Sep 17 00:00:00 2001 From: Flavio Castelli Date: Wed, 18 Nov 2020 12:29:50 +0100 Subject: [PATCH] Add release steps --- .github/workflows/release.yml | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c6b2ed8..c17a25c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -9,12 +9,34 @@ jobs: steps: - name: Checkout code uses: actions/checkout@v2 - - uses: actions-rs/toolchain@v1 + - name: Prepare Rust environment + uses: actions-rs/toolchain@v1 with: profile: minimal toolchain: stable target: wasm32-wasi - - uses: actions-rs/cargo@v1 + - name: Build WASM module + uses: actions-rs/cargo@v1 with: command: build args: --target=wasm32-wasi --release + - name: Create Release + id: create_release + uses: actions/create-release@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + tag_name: ${{ github.ref }} + release_name: Release ${{ github.ref }} + draft: false + prerelease: false + - name: Upload Release Asset + id: upload-release-asset + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} + asset_path: target/wasm32-wasi/release/pod-toleration-policy.wasm + asset_name: policy.wasm + asset_content_type: application/wasm