mesh-security icon indicating copy to clipboard operation
mesh-security copied to clipboard

CI: Run ts-codegen on release

Open josefleventon opened this issue 1 year ago • 4 comments

Would be great if we could publish a @mesh-security/types NPM package on every release.

josefleventon avatar Jun 26 '23 15:06 josefleventon

Happy for you to add that to CI. As it is pure npm / node.js code and I don't know github actions well

You can make a PR adding another step after build-schemas in the release workflow

ethanfrey avatar Jun 26 '23 16:06 ethanfrey

Let me refine my question. Can you provide me an example of any other project that does this? (Build and publish the ts-codegen bindings)

I thought a bit more and this is rather complex. I have always just downloaded wasm files and schema and build the new bindings in my client side libs. (I mean, a simple shell script that takes a version arg to download can do this pretty easy).

To really make this seamless, we would need to publish the actual wasm contracts (or .wasm.gz) in the npm package as well.

ethanfrey avatar Jun 27 '23 10:06 ethanfrey

Note: I don't even see any auto-upload (of wasm or json schema) on dao-dao's CI. I consider this a more advanced project and we will try to cover what they can do. Would be cool if they add this functionality and we can port to mesh-security

ethanfrey avatar Jun 28 '23 08:06 ethanfrey

@ethanfrey I can set this up -- we can use CircleCI to do this. CircleCI will build contracts into wasm files and when a new release is created, then run codegen & publish the npm package.

josefleventon avatar Jul 01 '23 02:07 josefleventon