Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 43 additions & 0 deletions .github/workflows/release-noir-wasm.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Release Noir Wasm

on:
workflow_dispatch:

jobs:
publish-noir-wasm:
runs-on: ubuntu-22.04

steps:
- name: Checkout
uses: actions/checkout@v3

- uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}

- uses: cachix/install-nix-action@v22
with:
nix_path: nixpkgs=channel:nixos-23.05

- name: Build with Nix
run: |
nix build -L .#wasm

- name: Copy output
run: |
cp -r $(readlink result)/* .

- name: Authenticate with npm
run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc

- name: Publish to npm
run: |
npm publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
4 changes: 1 addition & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,11 +74,9 @@ jobs:
- name: Dispatch to noir_wasm
uses: benc-uk/workflow-dispatch@v1
with:
workflow: update.yml
repo: noir-lang/noir_wasm
workflow: release-noir-wasm.yml
ref: master
token: ${{ secrets.NOIR_REPO_TOKEN }}
inputs: '{ "noir-ref": "${{ needs.release-please.outputs.tag-name }}" }'

publish-noir-js:
name: Publish noir_js package
Expand Down
2 changes: 1 addition & 1 deletion compiler/wasm/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ rm -rf $self_path/result >/dev/null 2>&1
if [ -v out ]; then
echo "Will install package to $out (defined outside installPhase.sh script)"
else
out="$self_path/outputs/out"
export out="$self_path/outputs/out"
echo "Will install package to $out"
fi

Expand Down