Skip to content

Instantly share code, notes, and snippets.

@pedro-mass
Last active May 7, 2024 08:36
Show Gist options
  • Save pedro-mass/ee6614a968679e7bd565e7e4f98fee3b to your computer and use it in GitHub Desktop.
Save pedro-mass/ee6614a968679e7bd565e7e4f98fee3b to your computer and use it in GitHub Desktop.
Setting up semantic-release with commit linter and commit message helper

Setting up Semantic-Release

Setup based off this article: https://hackernoon.com/these-6-essential-tools-will-maintain-your-npm-modules-for-you-4cbbee88e0cb

Table of Contents

Packages used

package description why
semantic-release Fully automated version management and package publishing handles publishing and changelog generation
marionebl/commitlint Lint commit messages allow people to create commits like normal, but be restricted if they don't match expected format
commitzen/cz-cli The commitizen command line utility. help people make commits (commitlint has a prompt sub-package @commitlint/prompt, but this one seemed more mature and commitlint still has to improve their prompt (https://github.com/marionebl/commitlint#roadmap))

Steps

Install semantic-release

Set up commit linter

Using marionebl/commitlint: https://github.com/marionebl/commitlint (referenced by semantic-release docs: https://github.com/marionebl/commitlint)

Commit Helper

Following these new conventions will be a hard shift from the norm. We have the linter in place to enforce, this step is to aid in the creation of commits

Using: https://github.com/commitizen/cz-cli

Troubleshooting

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment