From 735c323714d81a95b1c215d1e647216c46adb0b4 Mon Sep 17 00:00:00 2001 From: Tsiry Sandratraina Date: Mon, 8 Apr 2024 18:14:53 +0000 Subject: [PATCH] ci: add release workflow --- .github/workflows/release.yml | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..3939dfc --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,30 @@ +name: release +on: + release: + types: [created] +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Setup Fluent CI CLI + uses: fluentci-io/setup-fluentci@v4 + - uses: dtolnay/rust-toolchain@stable + with: + toolchain: stable + targets: wasm32-unknown-unknown + - name: Build + run: | + cargo build --release --target wasm32-unknown-unknown + ls -ltr target/wasm32-unknown-unknown/release/ + working-directory: plugin + - name: Set env + run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV + - name: Upload release + run: | + export FILE=/app/rust.wasm + fluentci run github_pipeline release_upload + working-directory: plugin/target/wasm32-unknown-unknown/release/ + env: + TAG: ${{ env.RELEASE_VERSION }} + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}