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

Running semantic release on the top level project #98

Open juancarlosjr97 opened 11 months ago

juancarlosjr97 commented 11 months ago

Issue type

Acknowledgement

Great work guys, with this issue (actually discussion) I hope I can contribute to the library and its support of it as I am big fan of semantic release :)

Discussion

I have projects that have a global configuration, or shared local packages and we have a monorepo structure. Now, the monorepo release works as expected, with no issues, but the top level as a whole does not run.

Based on what I could find, this is intended, as this runs as part of a semantic release. However, I thought of a workaround which was to trigger semantic release for monorepo and traditional repository, which is the issue. When semantic release runs for the top level project, if it is before, semantic release monorepo will see the branch as behind and it if is after the traditional monorepo will see it as behind so, so unless they run in parallel and pull the repository before any of them run the semantic release git change, then it does not work.

Actual behavior

I would love to run semantic release monorepo and if I have 5 workspaces, it will identify 6 releases, including the top level project as a whole and that could be optional.

Steps to reproduce

Specifications

juancarlosjr97 commented 11 months ago

Looking at the code, here https://github.com/qiwi/multi-semantic-release/blob/master/lib/multiSemanticRelease.js#L116 I have some thoughts to make it work, but if there is something we would like to add, I can make some time for it!