veramo icon indicating copy to clipboard operation
veramo copied to clipboard

[task] explore different options for release automation

Open mirceanis opened this issue 1 year ago • 0 comments

We rely on lerna to publish releases. The existing Veramo release automation can be described as follows:

  • Pushing something to main triggers a @latest release.
  • Pushing something to next triggers a @next pre-release.
  • @next pre-releases force all packages to be bumped to the same version and all are published to the @next dist-tag.
  • @latest releases depend on conventional-commit messages AND, because of lerna, also depend on code changes in each package.

This means that some pushes to main won't trigger a release if there are no fix:, feat: or BREAKING CHANGE: commit messages. And sometimes a release will only bump certain packages because they were the only ones containing code changes. This makes it hard(er) to keep all Veramo packages in sync, as they are only designed to work together at the same version. Mixing versions is not a good idea.

Lerna takes care of bumping dependencies for packages that depend on each-other, updating CHANGELOG.md files, publishing packages to npm and creating the GitHub release including all the relevant changelogs, based on commit messages.

This mostly works great, except that:

  • We need a better solution that is able to do all of the above(except publish all packages to latest when at least one gets bumped in version).
  • if the release process is interrupted (usually by npmjs.org HTTP problems), then lerna stops and won't retry, resulting in only some packages actually getting releases, but not all. Running it again will definitely fail if there are already some packages published.

Some possible tools to try out:

  • https://github.com/release-it/release-it
  • https://github.com/changesets/changesets

As a bonus, it would be great if all PRs could publish a pre-release so that they can be tested in the wild

mirceanis avatar Aug 18 '23 15:08 mirceanis