diff --git a/.github/workflows/publish-abi_wasm.yml b/.github/workflows/publish-abi_wasm.yml index feca0e58ff8..c84a8f0688b 100644 --- a/.github/workflows/publish-abi_wasm.yml +++ b/.github/workflows/publish-abi_wasm.yml @@ -32,8 +32,7 @@ jobs: github_access_token: ${{ secrets.GITHUB_TOKEN }} - name: Build noirc_abi_wasm - run: | - nix build -L .#noirc_abi_wasm + run: nix build .#noirc_abi_wasm - name: Discover Build Output Path run: echo "BUILD_OUTPUT_PATH=$(readlink -f ./result/noirc_abi_wasm)" >> $GITHUB_ENV @@ -42,10 +41,11 @@ jobs: run: | mkdir temp_publish_dir cp -r ${{ env.BUILD_OUTPUT_PATH }}/* temp_publish_dir/ + touch temp_publish_dir/yarn.lock - - name: Publish to npm + - name: Publish to NPM working-directory: ./temp_publish_dir - run: | - yarn npm publish --tag latest + run: yarn npm publish --tag latest env: NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + diff --git a/.github/workflows/publish-acvm-js.yml b/.github/workflows/publish-acvm-js.yml index b2145085a02..997cdbd565e 100644 --- a/.github/workflows/publish-acvm-js.yml +++ b/.github/workflows/publish-acvm-js.yml @@ -1,4 +1,4 @@ -name: Publish acvm_js +name: Publish acvm-js on: workflow_dispatch: @@ -33,22 +33,19 @@ jobs: authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}" - name: Build acvm-js - working-directory: acvm-repo - run: | - nix build .# + run: nix build .#acvm_js - name: Discover Build Output Path - working-directory: acvm-repo - run: echo "BUILD_OUTPUT_PATH=$(readlink -f ./result)" >> $GITHUB_ENV + run: echo "BUILD_OUTPUT_PATH=$(readlink -f ./result/acvm_js)" >> $GITHUB_ENV - name: Copy Build Output to Temporary Directory - working-directory: acvm-repo run: | mkdir temp_publish_dir cp -r ${{ env.BUILD_OUTPUT_PATH }}/* temp_publish_dir/ - + touch temp_publish_dir/yarn.lock + - name: Publish to NPM - working-directory: ./acvm-repo/temp_publish_dir - run: npm publish + working-directory: ./temp_publish_dir + run: yarn npm publish --tag latest env: NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/.github/workflows/publish-noir-js.yml b/.github/workflows/publish-noir-js.yml index 4614390e053..f10f0181fb6 100644 --- a/.github/workflows/publish-noir-js.yml +++ b/.github/workflows/publish-noir-js.yml @@ -1,4 +1,4 @@ -name: Release and Publish Noir Js +name: Publish Noir Js on: workflow_dispatch: @@ -17,11 +17,13 @@ jobs: - name: Install jq run: sudo apt-get install jq - - name: Install cargo and wasm-bindgen - run: | - curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y - source $HOME/.cargo/env - cargo install -f wasm-bindgen-cli --version 0.2.86 + - name: Setup toolchain + uses: dtolnay/rust-toolchain@1.66.0 + + - name: Install wasm-bindgen-cli + uses: taiki-e/install-action@v2 + with: + tool: wasm-bindgen-cli@0.2.86 - name: Install wasm-opt run: | @@ -34,6 +36,9 @@ jobs: - name: Build noirc_abi run: yarn workspace @noir-lang/noirc_abi build + - name: Build acvm_js + run: yarn workspace @noir-lang/acvm_js build + - name: Build noir_js run: yarn workspace @noir-lang/noir_js build diff --git a/.github/workflows/publish-noir-wasm.yml b/.github/workflows/publish-noir-wasm.yml index d862ad6993a..c434fa5077a 100644 --- a/.github/workflows/publish-noir-wasm.yml +++ b/.github/workflows/publish-noir-wasm.yml @@ -1,4 +1,4 @@ -name: Release Noir Wasm +name: Publish Noir Wasm on: workflow_dispatch: @@ -26,18 +26,22 @@ jobs: nix_path: nixpkgs=channel:nixos-23.05 - name: Build with Nix - run: | - nix build -L .#wasm + run: nix build .#noir_wasm + + - name: Discover Build Output Path + run: echo "BUILD_OUTPUT_PATH=$(readlink -f ./result/noir_wasm)" >> $GITHUB_ENV - - name: Copy output + - name: Copy Build Output to Temporary Directory run: | - cp -r $(readlink result)/* . - + mkdir temp_publish_dir + cp -r ${{ env.BUILD_OUTPUT_PATH }}/* temp_publish_dir/ + touch temp_publish_dir/yarn.lock + - name: Authenticate with npm run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc - - name: Publish to npm - run: | - npm publish --access public + - name: Publish to NPM + working-directory: ./temp_publish_dir + run: yarn npm publish --tag latest env: - NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} \ No newline at end of file + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/.github/workflows/publish-source-resolver.yml b/.github/workflows/publish-source-resolver.yml index f1f7574cc2b..399e72a7b96 100644 --- a/.github/workflows/publish-source-resolver.yml +++ b/.github/workflows/publish-source-resolver.yml @@ -11,6 +11,12 @@ jobs: - name: Checkout uses: actions/checkout@v4 + - name: Setup Node.js + uses: actions/setup-node@v3 + with: + registry-url: "https://registry.npmjs.org" + node-version: 18.15 + - name: Install dependencies run: yarn install --immutable diff --git a/.github/workflows/test-noir-js.yml b/.github/workflows/test-noir-js.yml index 7dc59d6b514..8f1862bdfdc 100644 --- a/.github/workflows/test-noir-js.yml +++ b/.github/workflows/test-noir-js.yml @@ -1,4 +1,4 @@ -name: Noir JS +name: Test Noir Js on: pull_request: