In my testing, I was publishing using a node 16 install, but on CI we
are using Node 12. It seems that the NPM that shipped with Node 12
ignores all files for publishing if they are mentioned in `.gitignore`
which I could reproduce locally.
Doing a bit of testing, I used this solution which I think we also used
in v2 when generating `dist/` files. The `npm publish --dry-run` now
_does_ include the generated types as well and they are still ignored
for version control.