-
Notifications
You must be signed in to change notification settings - Fork 26
Build NPM package and upload as artifact in GHA #977
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
Conversation
8e5448a to
6c07d8c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Haven't tested it, but it looks fine.
| cp result/cardano_node_grpc_web_pb.js cardano-wasm/npm-wrapper/src/ | ||
| cp -r result/node cardano-wasm/npm-wrapper/src/ | ||
| cd cardano-wasm/npm-wrapper | ||
| npm install |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is running in nix anyway, I'm wondering if we could provide dependencies from nix instead. I'm not too familiar with building using npm in nix, so I'm not 100% if that's possible.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The js proto bundle is being built with nix, and I think it probably is deterministical, but the actual cardano-wasm JavaScript package is not being built with nix. Maybe it should, good point.
I am not sure what the options for doing it with nix and their consequences are either. I did something like that for the generation of JS files from proto files (here) but, I basically provided a package-lock.json file and it hashes it, I think. On the other hand, package-lock.json file already has hashes for all dependencies. Even though I didn't commit that file to the repo either. Not sure
Changelog
Context
In order to make the publishing of the
cardano-wasmpackage more deterministic, this change allows GHA to build a.tgzfile that is ready for publishing.How to trust this PR
The generated
.tgzcan be found in the CI run.Checklist