/module-tagging-test

Test repo to experiment with automatic tagging workflows

The UnlicenseUnlicense

module-tagging-test

Test repo to experiment with automatic tagging workflows

How it works

A GitHub Action runs on pushes to the main branch. This runs (a compiled version of) the tag-updated-versions script.

This script looks at all the top-level modules, and for each one:

  • finds the latest tag (by semantic versioning)
  • looks at the commits between the last tag and the current SHA which modified the module
  • parses the Conventional Commits
    • if there are breaking changes (! suffix or BREAKING CHANGES note), then it's a major version update
    • if there are feat or feature commits, then it's a minor version update
    • if there are fix commits, then it's a patch version update
  • if an update is needed, the version is bumped appropriately, and a new release is created

Development

$ cd .github/scripts/tag-updated-versions
$ npm ci
$ npm run dev  # run locally
$ npm run build  # needed before committing