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: Add noir-wasm publishing as a workflow #2721

Merged
merged 8 commits into from
Sep 15, 2023
Merged
Show file tree
Hide file tree
Changes from 6 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') }}
TomAFrench marked this conversation as resolved.
Show resolved Hide resolved

- uses: cachix/install-nix-action@v20
with:
nix_path: nixpkgs=channel:nixpkgs-22.05
kevaundray marked this conversation as resolved.
Show resolved Hide resolved

- 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