Skip to content

Commit 0764cf4

Browse files
Jonathan BursztynTomAFrench
andauthored
chore: fix publishing workflows (#2926)
Co-authored-by: Tom French <[email protected]>
1 parent 2960483 commit 0764cf4

6 files changed

Lines changed: 44 additions & 32 deletions

File tree

.github/workflows/publish-abi_wasm.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,7 @@ jobs:
3232
github_access_token: ${{ secrets.GITHUB_TOKEN }}
3333

3434
- name: Build noirc_abi_wasm
35-
run: |
36-
nix build -L .#noirc_abi_wasm
35+
run: nix build .#noirc_abi_wasm
3736

3837
- name: Discover Build Output Path
3938
run: echo "BUILD_OUTPUT_PATH=$(readlink -f ./result/noirc_abi_wasm)" >> $GITHUB_ENV
@@ -42,10 +41,11 @@ jobs:
4241
run: |
4342
mkdir temp_publish_dir
4443
cp -r ${{ env.BUILD_OUTPUT_PATH }}/* temp_publish_dir/
44+
touch temp_publish_dir/yarn.lock
4545
46-
- name: Publish to npm
46+
- name: Publish to NPM
4747
working-directory: ./temp_publish_dir
48-
run: |
49-
yarn npm publish --tag latest
48+
run: yarn npm publish --tag latest
5049
env:
5150
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
51+

.github/workflows/publish-acvm-js.yml

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Publish acvm_js
1+
name: Publish acvm-js
22

33
on:
44
workflow_dispatch:
@@ -33,22 +33,19 @@ jobs:
3333
authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}"
3434

3535
- name: Build acvm-js
36-
working-directory: acvm-repo
37-
run: |
38-
nix build .#
36+
run: nix build .#acvm_js
3937

4038
- name: Discover Build Output Path
41-
working-directory: acvm-repo
42-
run: echo "BUILD_OUTPUT_PATH=$(readlink -f ./result)" >> $GITHUB_ENV
39+
run: echo "BUILD_OUTPUT_PATH=$(readlink -f ./result/acvm_js)" >> $GITHUB_ENV
4340

4441
- name: Copy Build Output to Temporary Directory
45-
working-directory: acvm-repo
4642
run: |
4743
mkdir temp_publish_dir
4844
cp -r ${{ env.BUILD_OUTPUT_PATH }}/* temp_publish_dir/
49-
45+
touch temp_publish_dir/yarn.lock
46+
5047
- name: Publish to NPM
51-
working-directory: ./acvm-repo/temp_publish_dir
52-
run: npm publish
48+
working-directory: ./temp_publish_dir
49+
run: yarn npm publish --tag latest
5350
env:
5451
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

.github/workflows/publish-noir-js.yml

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Release and Publish Noir Js
1+
name: Publish Noir Js
22

33
on:
44
workflow_dispatch:
@@ -17,11 +17,13 @@ jobs:
1717
- name: Install jq
1818
run: sudo apt-get install jq
1919

20-
- name: Install cargo and wasm-bindgen
21-
run: |
22-
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
23-
source $HOME/.cargo/env
24-
cargo install -f wasm-bindgen-cli --version 0.2.86
20+
- name: Setup toolchain
21+
uses: dtolnay/[email protected]
22+
23+
- name: Install wasm-bindgen-cli
24+
uses: taiki-e/install-action@v2
25+
with:
26+
2527

2628
- name: Install wasm-opt
2729
run: |
@@ -34,6 +36,9 @@ jobs:
3436
- name: Build noirc_abi
3537
run: yarn workspace @noir-lang/noirc_abi build
3638

39+
- name: Build acvm_js
40+
run: yarn workspace @noir-lang/acvm_js build
41+
3742
- name: Build noir_js
3843
run: yarn workspace @noir-lang/noir_js build
3944

.github/workflows/publish-noir-wasm.yml

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Release Noir Wasm
1+
name: Publish Noir Wasm
22

33
on:
44
workflow_dispatch:
@@ -26,18 +26,22 @@ jobs:
2626
nix_path: nixpkgs=channel:nixos-23.05
2727

2828
- name: Build with Nix
29-
run: |
30-
nix build -L .#wasm
29+
run: nix build .#noir_wasm
30+
31+
- name: Discover Build Output Path
32+
run: echo "BUILD_OUTPUT_PATH=$(readlink -f ./result/noir_wasm)" >> $GITHUB_ENV
3133

32-
- name: Copy output
34+
- name: Copy Build Output to Temporary Directory
3335
run: |
34-
cp -r $(readlink result)/* .
35-
36+
mkdir temp_publish_dir
37+
cp -r ${{ env.BUILD_OUTPUT_PATH }}/* temp_publish_dir/
38+
touch temp_publish_dir/yarn.lock
39+
3640
- name: Authenticate with npm
3741
run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc
3842

39-
- name: Publish to npm
40-
run: |
41-
npm publish --access public
43+
- name: Publish to NPM
44+
working-directory: ./temp_publish_dir
45+
run: yarn npm publish --tag latest
4246
env:
43-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
47+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

.github/workflows/publish-source-resolver.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,12 @@ jobs:
1111
- name: Checkout
1212
uses: actions/checkout@v4
1313

14+
- name: Setup Node.js
15+
uses: actions/setup-node@v3
16+
with:
17+
registry-url: "https://registry.npmjs.org"
18+
node-version: 18.15
19+
1420
- name: Install dependencies
1521
run: yarn install --immutable
1622

.github/workflows/test-noir-js.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Noir JS
1+
name: Test Noir Js
22

33
on:
44
pull_request:

0 commit comments

Comments
 (0)