How to build a custom plugin for Kibana v7.9.0?

I generated a new plugin using Kibana scripts node scripts/generate_plugin.js aplugin.
How to build a distributable .zip package for it? The one that can be installed like this

./bin/kibana-plugin install file:///plugin.zip

You run yarn build, documented here: https://github.com/elastic/kibana/tree/7.9/packages/kbn-plugin-generator#plugin-development-scripts

@wylie I'm aware of this helper. But it doesn't work for Kibana v7.9. Because it doesn't package kibana.json and webpack bundles.

Ok, I think it is a bug. I created the issue https://github.com/elastic/kibana/issues/75811