diff --git a/.github/workflows/abi_wasm.yml b/.github/workflows/abi_wasm.yml index b0af1e7e2c7..100eea88a12 100644 --- a/.github/workflows/abi_wasm.yml +++ b/.github/workflows/abi_wasm.yml @@ -86,7 +86,7 @@ jobs: uses: ./.github/actions/setup with: working-directory: ./crates/noirc_abi_wasm - + - name: Run node tests working-directory: ./crates/noirc_abi_wasm run: yarn test @@ -110,7 +110,7 @@ jobs: uses: ./.github/actions/setup with: working-directory: ./crates/noirc_abi_wasm - + - name: Install playwright deps working-directory: ./crates/noirc_abi_wasm run: | diff --git a/.github/workflows/release-abi_wasm.yml b/.github/workflows/release-abi_wasm.yml new file mode 100644 index 00000000000..d51dd56c5c3 --- /dev/null +++ b/.github/workflows/release-abi_wasm.yml @@ -0,0 +1,37 @@ +name: Release ABI Wasm + +on: + workflow_dispatch: + +jobs: + noirc-abi-wasm-build: + runs-on: ubuntu-latest + env: + CACHED_PATH: /tmp/nix-cache + + steps: + - name: Checkout sources + uses: actions/checkout@v3 + + - uses: cachix/install-nix-action@v20 + with: + nix_path: nixpkgs=channel:nixos-23.05 + github_access_token: ${{ secrets.GITHUB_TOKEN }} + + - name: Build noirc_abi_wasm + run: | + nix build -L .#noirc_abi_wasm + + - name: Discover Build Output Path + run: echo "BUILD_OUTPUT_PATH=$(readlink -f ./result)" >> $GITHUB_ENV + + - name: Copy Build Output to Temporary Directory + run: | + mkdir temp_publish_dir + cp -r ${{ env.BUILD_OUTPUT_PATH }}/* temp_publish_dir/ + + - name: Publish to NPM + working-directory: ./temp_publish_dir + run: npm publish + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}