From 660af100bf24fbbf0c016aed2855b2feb4b8e2a5 Mon Sep 17 00:00:00 2001 From: Koby Date: Thu, 12 Oct 2023 10:31:11 +0200 Subject: [PATCH] chore: use upload and download pattern --- .github/workflows/publish-es-packages.yml | 46 ++++++++++++++++++++--- 1 file changed, 40 insertions(+), 6 deletions(-) diff --git a/.github/workflows/publish-es-packages.yml b/.github/workflows/publish-es-packages.yml index 6fd6ae821f5..765cc7e99af 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: @@ -63,6 +70,13 @@ jobs: 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: @@ -86,23 +100,43 @@ jobs: - 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: List contents + run: | + ls -R acvm-repo/acvm_js + ls -R compiler/wasm + ls -R tooling/noirc_abi_wasm + - name: Install Yarn dependencies run: yarn install @@ -112,7 +146,7 @@ jobs: 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' }}