Publishing on

Once you'll have successfully build your module for Deno you will want to publish it on
The easy way is to just git add the deno_dist directory to your project, heads over to and register your module specifying deno_dist as subdirectory
deno_registration doesn't allow the - character, if your module contain some, use _ insted.
Example: foo-bar -> foo_bar

Avoiding tracking deno_dist on the main branch

deno_dist is not source code. It shouldn't be tracked by git to avoid that we need a CI workflow that, when we release:
  • Create a tmp_branch
  • Builds locally, there by creating the deno_dist/ directory.
  • Remove /deno_dist from the .gitignore
  • Commit all deno_dist/* files (the commit exist only on the tmp_branch).
  • Creates a new GitHub release targeting tmp_branch
  • Release on NPM
  • We remove the tmp_branch
You can copy paste to your project the CI setup of tsafe, it's fully portable and does just that.
If you want more infos about this workflow you can follow this PR where I set it up on the ts-pattern repo.
Do not hesitate to open a discursion if you need support issues.