We are using lerna
to manage a monorepo and we want to automate the publishing process:
- The developer makes changes in one of the packages in the monorepo
- The CI detects that changes have been made
- The CI builds the package, the patch level is automatically incremented, and the new package is published, tags are pushed to git, etc.
To avoid infinite cycles ( build -> tag -> push -> build -> tag -> ...), the CI should only build if there are indeed changes - hence step 2
How can one do that with
lerna
? Is 'from-git' an option?Is there any other "best practice" how to use
lerna
in a CI environment?