From c04fcb23158469b3bfc7ca6e18b48f8f53ea7120 Mon Sep 17 00:00:00 2001 From: Koby Date: Thu, 12 Oct 2023 10:41:18 +0200 Subject: [PATCH] chore: use upload and download pattern --- .github/workflows/publish-es-packages.yml | 55 ++++++++++++++--------- 1 file changed, 34 insertions(+), 21 deletions(-) diff --git a/.github/workflows/publish-es-packages.yml b/.github/workflows/publish-es-packages.yml index 6fd6ae821f5..14630434453 100644 --- a/.github/workflows/publish-es-packages.yml +++ b/.github/workflows/publish-es-packages.yml @@ -39,6 +39,13 @@ jobs: run: | nix build -L .#noir_wasm + - uses: actions/upload-artifact@v3 + with: + name: noir_wasm + path: | + result/noir_wasm/nodejs + result/noir_wasm/web + build-noirc_abi_wasm: runs-on: ubuntu-latest steps: @@ -53,16 +60,18 @@ jobs: github-token: ${{ secrets.GITHUB_TOKEN }} nix-cache-name: ${{ vars.NIX_CACHE_NAME }} cachix-auth-token: ${{ secrets.CACHIXAUTHTOKEN }} - - - name: Enable aztec features - if: ${{ inputs.npm-tag == 'aztec' }} - run: | - echo $'\n'"default = [\"aztec\"]"$'\n' >> compiler/noirc_frontend/Cargo.toml - name: Build wasm package run: | nix build -L .#noirc_abi_wasm + - uses: actions/upload-artifact@v3 + with: + name: noirc_abi_wasm + path: | + result/noirc_abi_wasm/nodejs + result/noirc_abi_wasm/web + build-acvm_js: runs-on: ubuntu-latest steps: @@ -78,41 +87,45 @@ jobs: nix-cache-name: ${{ vars.NIX_CACHE_NAME }} cachix-auth-token: ${{ secrets.CACHIXAUTHTOKEN }} - - name: Enable aztec features - if: ${{ inputs.npm-tag == 'aztec' }} - run: | - echo $'\n'"default = [\"aztec\"]"$'\n' >> compiler/noirc_frontend/Cargo.toml - - name: Build wasm package run: | nix build -L .#acvm_js + + - uses: actions/upload-artifact@v3 + with: + name: acvm_js + path: | + result/acvm_js/nodejs + result/acvm_js/web publish-es-packages: runs-on: ubuntu-latest needs: [build-acvm_js, build-noirc_abi_wasm, build-noir_wasm] steps: + - name: Checkout sources uses: actions/checkout@v4 with: ref: ${{ inputs.noir-ref }} - - name: Setup Nix - uses: ./.github/actions/nix + - uses: actions/download-artifact@v3 with: - github-token: ${{ secrets.GITHUB_TOKEN }} - nix-cache-name: ${{ vars.NIX_CACHE_NAME }} - cachix-auth-token: ${{ secrets.CACHIXAUTHTOKEN }} + name: acvm_js + path: acvm-repo/acvm_js + - uses: actions/download-artifact@v3 + with: + name: noir_wasm + path: compiler/wasm + - uses: actions/download-artifact@v3 + with: + name: noirc_abi_wasm + path: tooling/noirc_abi_wasm - name: Install Yarn dependencies run: yarn install - - name: Enable aztec features - if: ${{ inputs.npm-tag == 'aztec' }} - run: | - echo $'\n'"default = [\"aztec\"]"$'\n' >> compiler/noirc_frontend/Cargo.toml - - name: Build ES Packages - run: yarn prepare:publish + run: yarn build:js:only - name: Prepare nightly version if: ${{ inputs.npm-tag != 'latest' }}