qiwi / multi-semantic-release

Proof of concept that wraps semantic-release to work with monorepos.
BSD Zero Clause License
86 stars 34 forks source link

Releases should happen only on changed packages, and not for all #52

Open bertearazvan opened 3 years ago

bertearazvan commented 3 years ago

Hi,

We currently have a monorepo with 2 packages and the way we would like to publish them is by running the semantic-release-multi in the root of our lerna repo and based on the changes in each of the package(together with the angular commit messages), the semantic release should publish only the changed package.

The way we are spotting changes on the packages when we push to git is by having pipelines that get triggered on folder path changes - so for instance if there is a change on packages/icons it will trigger the pipeline devoted to this package.

When running the semantic-release-multi, it publishes both packages under the same version, and a work around for now is to use the --ignore-packages=packages/a/**,packages/b/** flag.

It would be nice if we can specify the list of packages that we want published too, and not only the ones that should be ignored... such that in the pipeline we specify only the given package that should be published instead of ignoring all the other ones.

Or maybe I missed out on something, is the multi-semantic-release supposed to spot the changes per package by itself?

antongolub commented 3 years ago

Hey, @bertearazvan,

Thanks for your feedback. We're also thinking about smth similar: we're planning to add a special layer/plugin for advanced control of bumping mechanics. Here's the draft: https://github.com/qiwi/semantic-release-toolkit/blob/add-bumper/packages/bumper/src/main/ts/config.ts Stay tuned)