Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: fix publishing workflows #2926

Merged
merged 13 commits into from
Oct 3, 2023
10 changes: 5 additions & 5 deletions .github/workflows/publish-abi_wasm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,7 @@ jobs:
github_access_token: ${{ secrets.GITHUB_TOKEN }}

- name: Build noirc_abi_wasm
run: |
nix build -L .#noirc_abi_wasm
run: nix build .#noirc_abi_wasm

- name: Discover Build Output Path
run: echo "BUILD_OUTPUT_PATH=$(readlink -f ./result/noirc_abi_wasm)" >> $GITHUB_ENV
Expand All @@ -42,10 +41,11 @@ jobs:
run: |
mkdir temp_publish_dir
cp -r ${{ env.BUILD_OUTPUT_PATH }}/* temp_publish_dir/
touch temp_publish_dir/yarn.lock
kobyhallx marked this conversation as resolved.
Show resolved Hide resolved

- name: Publish to npm
- name: Publish to NPM
working-directory: ./temp_publish_dir
run: |
yarn npm publish --tag latest
run: yarn npm publish --tag latest
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

17 changes: 7 additions & 10 deletions .github/workflows/publish-acvm-js.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Publish acvm_js
name: Publish acvm-js

on:
workflow_dispatch:
Expand Down Expand Up @@ -33,22 +33,19 @@ jobs:
authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}"

- name: Build acvm-js
working-directory: acvm-repo
run: |
nix build .#
run: nix build .#acvm_js

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

- name: Copy Build Output to Temporary Directory
working-directory: acvm-repo
run: |
mkdir temp_publish_dir
cp -r ${{ env.BUILD_OUTPUT_PATH }}/* temp_publish_dir/

touch temp_publish_dir/yarn.lock

- name: Publish to NPM
working-directory: ./acvm-repo/temp_publish_dir
run: npm publish
working-directory: ./temp_publish_dir
run: yarn npm publish --tag latest
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
19 changes: 13 additions & 6 deletions .github/workflows/publish-noir-js.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Release and Publish Noir Js
name: Publish Noir Js

on:
workflow_dispatch:
Expand All @@ -17,11 +17,15 @@ jobs:
- name: Install jq
run: sudo apt-get install jq

- name: Install cargo and wasm-bindgen
run: |
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
source $HOME/.cargo/env
cargo install -f wasm-bindgen-cli --version 0.2.86
- name: Setup toolchain
uses: dtolnay/rust-toolchain@master
with:
toolchain: 1.67.0

jonybur marked this conversation as resolved.
Show resolved Hide resolved
jonybur marked this conversation as resolved.
Show resolved Hide resolved
- name: Install wasm-bindgen-cli
uses: taiki-e/install-action@v2
with:
tool: wasm-bindgen-cli@0.2.86

- name: Install wasm-opt
run: |
Expand All @@ -34,6 +38,9 @@ jobs:
- name: Build noirc_abi
run: yarn workspace @noir-lang/noirc_abi build

- name: Build acvm_js
run: yarn workspace @noir-lang/acvm_js build
kobyhallx marked this conversation as resolved.
Show resolved Hide resolved

- name: Build noir_js
run: yarn workspace @noir-lang/noir_js build

jonybur marked this conversation as resolved.
Show resolved Hide resolved
Expand Down
24 changes: 14 additions & 10 deletions .github/workflows/publish-noir-wasm.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Release Noir Wasm
name: Publish Noir Wasm

on:
workflow_dispatch:
Expand Down Expand Up @@ -26,18 +26,22 @@ jobs:
nix_path: nixpkgs=channel:nixos-23.05

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

- name: Discover Build Output Path
run: echo "BUILD_OUTPUT_PATH=$(readlink -f ./result/noir_wasm)" >> $GITHUB_ENV

- name: Copy output
- name: Copy Build Output to Temporary Directory
run: |
cp -r $(readlink result)/* .

mkdir temp_publish_dir
cp -r ${{ env.BUILD_OUTPUT_PATH }}/* temp_publish_dir/
touch temp_publish_dir/yarn.lock

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

- name: Publish to npm
run: |
npm publish --access public
- name: Publish to NPM
working-directory: ./temp_publish_dir
run: yarn npm publish --tag latest
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
6 changes: 6 additions & 0 deletions .github/workflows/publish-source-resolver.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v3
with:
registry-url: "https://registry.npmjs.org"
node-version: 18.15
jonybur marked this conversation as resolved.
Show resolved Hide resolved

- name: Install dependencies
run: yarn install --immutable

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-noir-js.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Noir JS
name: Test Noir Js

on:
pull_request:
Expand Down
Loading