diff --git a/.github/workflows/publish-acvm-js.yml b/.github/workflows/publish-acvm-js.yml new file mode 100644 index 00000000..5e978de2 --- /dev/null +++ b/.github/workflows/publish-acvm-js.yml @@ -0,0 +1,41 @@ +name: Publish acvm_js + +on: + push: + tags: + - "acvm_js-v*" + +jobs: + build-acvm-js-package: + runs-on: ubuntu-latest + steps: + - name: Checkout sources + uses: actions/checkout@v4 + + - uses: cachix/install-nix-action@v22 + with: + nix_path: nixpkgs=channel:nixos-23.05 + github_access_token: ${{ secrets.GITHUB_TOKEN }} + + - uses: cachix/cachix-action@v12 + with: + name: barretenberg + authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}" + + - name: Build acvm-js + run: | + nix build .# + + - 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 }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 1effb3f2..ed2e0f61 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -32,18 +32,3 @@ jobs: workflow: publish.yml ref: master inputs: '{ "acvm-ref": "${{ needs.release-please.outputs.tag-name }}" }' - - dispatch-acvm-js-wasm: - name: Dispatch to acvm-js-wasm - needs: [release-please] - if: ${{ needs.release-please.outputs.tag-name }} - runs-on: ubuntu-latest - steps: - - name: Dispatch to acvm-js-wasm - uses: benc-uk/workflow-dispatch@v1 - with: - workflow: update.yml - repo: noir-lang/acvm-js-wasm - token: ${{ secrets.ACVM_JS_RELEASES_TOKEN }} - inputs: '{ "acvm-js-ref": "${{ needs.release-please.outputs.tag-name }}" }' - \ No newline at end of file