Draft: Best Practices in JavaScript Release Automation

There is a step change in industry-standard knowledge when going from individual contributor to maintainer, whether working on open source projects or closed source company infrastructure. It is easy enough to fork, write code, and add PR, and it is intentionally easy to get started manually publishing releases. (This also helps keep the core infrastructure as tooling agnostic as possible, which increases its longevity.) However, a low barrier to entry and small set of enforced/required standards also makes it hard to keep up a high quality project.

Maintenance of a high quality project requires setting up systems to ensure quality ("hold the line") and automate duplicative tasks. Unfortunately, these are mostly set-and-forget tasks done by a small group of very busy, informally trained people, not all of whom agree on what to do, so the documentation for this is sparse.

I recently asked about release automation practices and got some great responses, and this will be my ongoing catalog of notes. I acknowledge and refer you to other resources at the bottom.


to be completed

Manual Publishing

What we want:

  • well formatted
  • autogenerated changelogs from commits
  • releases to npm simultaneously tagged and published to github

How to do this:

  • use commitizen
  • use auto-changelog
    • put it in an npm hook so you run and add it every time
    • "version": "auto-changelog -p --template keepachangelog && git add CHANGELOG.md"
  • use gh-release
    • put it in an npm hook to make sure you push tags too
    • "prepublishOnly": "git push && git push --tags && gh-release"

Other methods I need to explore:

Automated Publishing

to be completed

More Resources

⚠️ You are reading an unpublished, incomplete draft. Questions are welcome but feedback/criticism may be premature.