From 8eeeadc84f6ca93fde3520ccb9b1cf287b67d9e4 Mon Sep 17 00:00:00 2001 From: 0xZensh Date: Mon, 8 Jul 2024 17:57:38 +0800 Subject: [PATCH] chore: add `build-canisters` action; try to fix `publish` action --- .github/workflows/build-canisters.yml | 24 ++++++++++++++++++++++++ .github/workflows/publish.yml | 9 +-------- 2 files changed, 25 insertions(+), 8 deletions(-) create mode 100644 .github/workflows/build-canisters.yml diff --git a/.github/workflows/build-canisters.yml b/.github/workflows/build-canisters.yml new file mode 100644 index 0000000..cca6671 --- /dev/null +++ b/.github/workflows/build-canisters.yml @@ -0,0 +1,24 @@ +name: CI +on: + push: + branches: [ "main" ] +jobs: + test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: Swatinem/rust-cache@v2 + - uses: dfinity/setup-dfx@main + - name: Build canisters + run: | + dfx --version + dfx build idempotent-proxy-canister + cd target/wasm32-unknown-unknown/release + gzip idempotent_proxy_canister.wasm + sha256sum idempotent_proxy_canister.wasm.gz > idempotent_proxy_canister.wasm.gz.sha256.txt + - name: Release + uses: softprops/action-gh-release@v2 + with: + files: | + idempotent_proxy_canister.wasm.gz + idempotent_proxy_canister.wasm.gz.sha256.txt diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 790b0a6..34f5e44 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -1,8 +1,7 @@ name: Publish on: push: - tags: - - 'v*' + branches: [ "main" ] jobs: publish: runs-on: ubuntu-latest @@ -12,9 +11,3 @@ jobs: with: registry-token: ${{ secrets.CARGO_REGISTRY_TOKEN }} ignore-unpublished-changes: true - args: -p idempotent-proxy-types - - uses: katyo/publish-crates@v2 - with: - registry-token: ${{ secrets.CARGO_REGISTRY_TOKEN }} - ignore-unpublished-changes: true - args: -p idempotent-proxy-server