From 93f3a7d29c6fb13e52ac4c74862487b8413dadd4 Mon Sep 17 00:00:00 2001 From: Jonathan Bursztyn Date: Fri, 8 Sep 2023 18:26:24 +0200 Subject: [PATCH 01/14] Update npm token --- .github/workflows/release-abi_wasm.yml | 2 +- .github/workflows/release-source-resolver.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release-abi_wasm.yml b/.github/workflows/release-abi_wasm.yml index d51dd56c5c3..07cccba568b 100644 --- a/.github/workflows/release-abi_wasm.yml +++ b/.github/workflows/release-abi_wasm.yml @@ -34,4 +34,4 @@ jobs: working-directory: ./temp_publish_dir run: npm publish env: - NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }} diff --git a/.github/workflows/release-source-resolver.yml b/.github/workflows/release-source-resolver.yml index dc44dbc756f..1e2e18c0067 100644 --- a/.github/workflows/release-source-resolver.yml +++ b/.github/workflows/release-source-resolver.yml @@ -38,7 +38,7 @@ jobs: working-directory: ./crates/source-resolver run: npm publish env: - NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }} - name: Configure git run: | From 05b8bf4bfa5a147b8e98abc882d873d8fcf73f79 Mon Sep 17 00:00:00 2001 From: Jonathan Bursztyn Date: Mon, 11 Sep 2023 15:46:10 +0100 Subject: [PATCH 02/14] Edits to fix NPM token issue --- .github/workflows/release-abi_wasm.yml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release-abi_wasm.yml b/.github/workflows/release-abi_wasm.yml index 07cccba568b..3a89b9efc62 100644 --- a/.github/workflows/release-abi_wasm.yml +++ b/.github/workflows/release-abi_wasm.yml @@ -2,6 +2,9 @@ name: Release ABI Wasm on: workflow_dispatch: + push: + branches: + - jb/update-npm-token jobs: noirc-abi-wasm-build: @@ -13,6 +16,11 @@ jobs: - name: Checkout sources uses: actions/checkout@v3 + - name: Setup .npmrc file for npm + run: echo "//registry.npmjs.org/:_authToken=${NODE_AUTH_TOKEN}" > .npmrc + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }} + - uses: cachix/install-nix-action@v20 with: nix_path: nixpkgs=channel:nixos-23.05 @@ -32,6 +40,7 @@ jobs: - name: Publish to NPM working-directory: ./temp_publish_dir - run: npm publish + run: | + npm publish --tag latest env: NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }} From 0306be35c36887cbd53602532bcd78a39d81b7e0 Mon Sep 17 00:00:00 2001 From: Jonathan Bursztyn Date: Mon, 11 Sep 2023 16:08:52 +0100 Subject: [PATCH 03/14] Fixes for npm publish --- .github/workflows/release-abi_wasm.yml | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/.github/workflows/release-abi_wasm.yml b/.github/workflows/release-abi_wasm.yml index 3a89b9efc62..74130bda6f9 100644 --- a/.github/workflows/release-abi_wasm.yml +++ b/.github/workflows/release-abi_wasm.yml @@ -16,8 +16,10 @@ jobs: - name: Checkout sources uses: actions/checkout@v3 - - name: Setup .npmrc file for npm - run: echo "//registry.npmjs.org/:_authToken=${NODE_AUTH_TOKEN}" > .npmrc + - name: Setup .npmrc file for GitHub Packages + run: | + echo "@noir-lang:registry=https://npm.pkg.github.com/" > .npmrc + echo "//npm.pkg.github.com/:_authToken=${NODE_AUTH_TOKEN}" >> .npmrc env: NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }} @@ -38,9 +40,13 @@ jobs: mkdir temp_publish_dir cp -r ${{ env.BUILD_OUTPUT_PATH }}/* temp_publish_dir/ - - name: Publish to NPM + - name: Install Dependencies + run: yarn install --immutable + working-directory: ./temp_publish_dir + + - name: Publish to GitHub Packages working-directory: ./temp_publish_dir run: | - npm publish --tag latest + yarn npm publish --tag latest --registry=https://npm.pkg.github.com/ env: NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }} From 85d0370eec872607636a715a7980ad110a78601b Mon Sep 17 00:00:00 2001 From: Jonathan Bursztyn Date: Mon, 11 Sep 2023 16:22:46 +0100 Subject: [PATCH 04/14] Use npm instead of yarn --- .github/workflows/release-abi_wasm.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release-abi_wasm.yml b/.github/workflows/release-abi_wasm.yml index 74130bda6f9..4b674e2a523 100644 --- a/.github/workflows/release-abi_wasm.yml +++ b/.github/workflows/release-abi_wasm.yml @@ -47,6 +47,6 @@ jobs: - name: Publish to GitHub Packages working-directory: ./temp_publish_dir run: | - yarn npm publish --tag latest --registry=https://npm.pkg.github.com/ + npm publish --tag latest --registry=https://npm.pkg.github.com/ env: NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }} From c7a256a6d0ca635f4d3afe8a05567b329b095dfa Mon Sep 17 00:00:00 2001 From: Jonathan Bursztyn Date: Mon, 11 Sep 2023 16:38:59 +0100 Subject: [PATCH 05/14] Install node --- .github/workflows/release-abi_wasm.yml | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/.github/workflows/release-abi_wasm.yml b/.github/workflows/release-abi_wasm.yml index 4b674e2a523..9e4d43c1a88 100644 --- a/.github/workflows/release-abi_wasm.yml +++ b/.github/workflows/release-abi_wasm.yml @@ -16,12 +16,17 @@ jobs: - name: Checkout sources uses: actions/checkout@v3 - - name: Setup .npmrc file for GitHub Packages - run: | - echo "@noir-lang:registry=https://npm.pkg.github.com/" > .npmrc - echo "//npm.pkg.github.com/:_authToken=${NODE_AUTH_TOKEN}" >> .npmrc - env: - NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }} + - name: Install node + uses: actions/setup-node@v3 + with: + node-version: 18.15 + + # - name: Setup .npmrc file for GitHub Packages + # run: | + # echo "@noir-lang:registry=https://npm.pkg.github.com/" > .npmrc + # echo "//npm.pkg.github.com/:_authToken=${NODE_AUTH_TOKEN}" >> .npmrc + # env: + # NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }} - uses: cachix/install-nix-action@v20 with: From 181eaf4b1f12141fa9162a4e8afd291e7a59abe2 Mon Sep 17 00:00:00 2001 From: Jonathan Bursztyn Date: Mon, 11 Sep 2023 16:55:19 +0100 Subject: [PATCH 06/14] Add registry url to node setup --- .github/workflows/release-abi_wasm.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release-abi_wasm.yml b/.github/workflows/release-abi_wasm.yml index 9e4d43c1a88..abb025af9e3 100644 --- a/.github/workflows/release-abi_wasm.yml +++ b/.github/workflows/release-abi_wasm.yml @@ -16,10 +16,11 @@ jobs: - name: Checkout sources uses: actions/checkout@v3 - - name: Install node + - name: Setup Node.js uses: actions/setup-node@v3 with: - node-version: 18.15 + registry-url: "https://registry.npmjs.org" + node-version: "lts/*" # - name: Setup .npmrc file for GitHub Packages # run: | From 7de1c4442e3b76a84296662bac935c35e3b15c46 Mon Sep 17 00:00:00 2001 From: Jonathan Bursztyn Date: Mon, 11 Sep 2023 17:16:28 +0100 Subject: [PATCH 07/14] Try dummy token to fix issue --- .github/workflows/release-abi_wasm.yml | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/.github/workflows/release-abi_wasm.yml b/.github/workflows/release-abi_wasm.yml index abb025af9e3..ec927c1c308 100644 --- a/.github/workflows/release-abi_wasm.yml +++ b/.github/workflows/release-abi_wasm.yml @@ -22,12 +22,10 @@ jobs: registry-url: "https://registry.npmjs.org" node-version: "lts/*" - # - name: Setup .npmrc file for GitHub Packages - # run: | - # echo "@noir-lang:registry=https://npm.pkg.github.com/" > .npmrc - # echo "//npm.pkg.github.com/:_authToken=${NODE_AUTH_TOKEN}" >> .npmrc - # env: - # NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }} + - name: Setup .npmrc file + run: | + echo "//registry.npmjs.org/:_authToken=dummy" > .npmrc + echo "@noir-lang:registry=https://npm.pkg.github.com/" >> .npmrc - uses: cachix/install-nix-action@v20 with: From ba6c012eac04d5cd9539b47ca1aa5c863f015304 Mon Sep 17 00:00:00 2001 From: Jonathan Bursztyn Date: Mon, 11 Sep 2023 18:01:59 +0100 Subject: [PATCH 08/14] Remove bad setup --- .github/workflows/release-abi_wasm.yml | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/.github/workflows/release-abi_wasm.yml b/.github/workflows/release-abi_wasm.yml index ec927c1c308..86d2e2b34b8 100644 --- a/.github/workflows/release-abi_wasm.yml +++ b/.github/workflows/release-abi_wasm.yml @@ -20,12 +20,6 @@ jobs: uses: actions/setup-node@v3 with: registry-url: "https://registry.npmjs.org" - node-version: "lts/*" - - - name: Setup .npmrc file - run: | - echo "//registry.npmjs.org/:_authToken=dummy" > .npmrc - echo "@noir-lang:registry=https://npm.pkg.github.com/" >> .npmrc - uses: cachix/install-nix-action@v20 with: @@ -44,13 +38,8 @@ jobs: mkdir temp_publish_dir cp -r ${{ env.BUILD_OUTPUT_PATH }}/* temp_publish_dir/ - - name: Install Dependencies - run: yarn install --immutable + - name: Publish to NPM working-directory: ./temp_publish_dir - - - name: Publish to GitHub Packages - working-directory: ./temp_publish_dir - run: | - npm publish --tag latest --registry=https://npm.pkg.github.com/ + run: npm publish env: NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }} From 5724965e05a6fc812752813e747f1258d438b16b Mon Sep 17 00:00:00 2001 From: Jonathan Bursztyn Date: Mon, 11 Sep 2023 18:26:26 +0100 Subject: [PATCH 09/14] Make abi_wasm to be public --- .github/workflows/release-abi_wasm.yml | 1 + crates/noirc_abi_wasm/package.json | 3 +++ 2 files changed, 4 insertions(+) diff --git a/.github/workflows/release-abi_wasm.yml b/.github/workflows/release-abi_wasm.yml index 86d2e2b34b8..7fc0f8b6da6 100644 --- a/.github/workflows/release-abi_wasm.yml +++ b/.github/workflows/release-abi_wasm.yml @@ -20,6 +20,7 @@ jobs: uses: actions/setup-node@v3 with: registry-url: "https://registry.npmjs.org" + node-version: "lts/*" - uses: cachix/install-nix-action@v20 with: diff --git a/crates/noirc_abi_wasm/package.json b/crates/noirc_abi_wasm/package.json index e32fb584e53..68197e6e1c9 100644 --- a/crates/noirc_abi_wasm/package.json +++ b/crates/noirc_abi_wasm/package.json @@ -9,6 +9,9 @@ "web", "package.json" ], + "publishConfig": { + "access": "public" + }, "main": "./nodejs/noirc_abi_wasm.js", "types": "./web/noirc_abi_wasm.d.ts", "module": "./web/noirc_abi_wasm.js", From 1f1c5c75188b6d2d7867e75677c52bb9810f3c4a Mon Sep 17 00:00:00 2001 From: Jonathan Bursztyn Date: Mon, 11 Sep 2023 18:41:54 +0100 Subject: [PATCH 10/14] Remove on push to branch --- .github/workflows/release-abi_wasm.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/release-abi_wasm.yml b/.github/workflows/release-abi_wasm.yml index 7fc0f8b6da6..d387c3051d5 100644 --- a/.github/workflows/release-abi_wasm.yml +++ b/.github/workflows/release-abi_wasm.yml @@ -2,9 +2,6 @@ name: Release ABI Wasm on: workflow_dispatch: - push: - branches: - - jb/update-npm-token jobs: noirc-abi-wasm-build: From 0a75d99c3d06639ea119944e6a4c3738d9783439 Mon Sep 17 00:00:00 2001 From: Jonathan Bursztyn Date: Mon, 11 Sep 2023 22:01:21 +0100 Subject: [PATCH 11/14] Update token to NPM_TOKEN --- .github/workflows/release-abi_wasm.yml | 2 +- .github/workflows/release-source-resolver.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release-abi_wasm.yml b/.github/workflows/release-abi_wasm.yml index d387c3051d5..5900b3174f0 100644 --- a/.github/workflows/release-abi_wasm.yml +++ b/.github/workflows/release-abi_wasm.yml @@ -40,4 +40,4 @@ jobs: working-directory: ./temp_publish_dir run: npm publish env: - NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }} + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/.github/workflows/release-source-resolver.yml b/.github/workflows/release-source-resolver.yml index 1e2e18c0067..dc44dbc756f 100644 --- a/.github/workflows/release-source-resolver.yml +++ b/.github/workflows/release-source-resolver.yml @@ -38,7 +38,7 @@ jobs: working-directory: ./crates/source-resolver run: npm publish env: - NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }} + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} - name: Configure git run: | From cf73555fbdc10dd1bf61ef46c397588f64d3f6c5 Mon Sep 17 00:00:00 2001 From: Jonathan Bursztyn Date: Tue, 12 Sep 2023 10:50:47 +0100 Subject: [PATCH 12/14] Update .github/workflows/release-abi_wasm.yml Co-authored-by: Koby Hall <102518238+kobyhallx@users.noreply.github.com> --- .github/workflows/release-abi_wasm.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release-abi_wasm.yml b/.github/workflows/release-abi_wasm.yml index 5900b3174f0..0d62572aac2 100644 --- a/.github/workflows/release-abi_wasm.yml +++ b/.github/workflows/release-abi_wasm.yml @@ -19,7 +19,7 @@ jobs: registry-url: "https://registry.npmjs.org" node-version: "lts/*" - - uses: cachix/install-nix-action@v20 + - uses: cachix/install-nix-action@v22 with: nix_path: nixpkgs=channel:nixos-23.05 github_access_token: ${{ secrets.GITHUB_TOKEN }} From 9dde8e45984447946fe32c4550ea0086bd3b4c76 Mon Sep 17 00:00:00 2001 From: Jonathan Bursztyn Date: Tue, 12 Sep 2023 10:56:55 +0100 Subject: [PATCH 13/14] Set up node version --- .github/workflows/release-abi_wasm.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release-abi_wasm.yml b/.github/workflows/release-abi_wasm.yml index 5900b3174f0..29158eb702d 100644 --- a/.github/workflows/release-abi_wasm.yml +++ b/.github/workflows/release-abi_wasm.yml @@ -17,7 +17,7 @@ jobs: uses: actions/setup-node@v3 with: registry-url: "https://registry.npmjs.org" - node-version: "lts/*" + node-version: 18.15 - uses: cachix/install-nix-action@v20 with: From c13d49c4d9d015bacd68977194f231eb3f02ded6 Mon Sep 17 00:00:00 2001 From: Jonathan Bursztyn Date: Wed, 13 Sep 2023 10:01:58 +0100 Subject: [PATCH 14/14] Bump noirc_abi to 0.10.3 --- tooling/noirc_abi_wasm/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tooling/noirc_abi_wasm/package.json b/tooling/noirc_abi_wasm/package.json index 68197e6e1c9..c315aa5819c 100644 --- a/tooling/noirc_abi_wasm/package.json +++ b/tooling/noirc_abi_wasm/package.json @@ -3,7 +3,7 @@ "collaborators": [ "The Noir Team " ], - "version": "0.8.0", + "version": "0.10.3", "files": [ "nodejs", "web",