semantic-release-monorepo icon indicating copy to clipboard operation
semantic-release-monorepo copied to clipboard

release.config.js or .releaserc.js is not inherited by sub-directories/packages on semantic-release v23

Open gojanpaolo opened this issue 11 months ago • 3 comments

Hello! We recently updated to semantic-release v23 and it looks the release.config.js or releaserc.js is not inherited anymore by sub-directories/packages. Downgrading to semantic-release v22 (e.g. 22.0.12) still works.

There's a similar discussion here: https://github.com/semantic-release/semantic-release/discussions/3158

And this is the breaking change from the release notes of semantic-release

if using release.config.js as the name of your config file, it needs to be moved to a .config/ directory or renamed to .releaserc.js to keep it in the root of the repository. see https://github.com/cosmiconfig/cosmiconfig/releases/tag/v9.0.0 for more detail

https://github.com/semantic-release/semantic-release/releases/tag/v23.0.0

We've tried both release.config.js and .releaserc.js. And also tried moving those files in .config/ folder. But none worked on v23.

gojanpaolo avatar Feb 27 '24 02:02 gojanpaolo

EDIT: Workaround below didn't actually work

This seemed to work on our end with v23. In root package.json

{
  ...
  "scripts": {
    ...
    "semantic-release": "yarn lerna exec --stream \"yarn semantic-release -e $(pwd)/release.config.js\""
  }
}

The relevant part is passing -e $(pwd)/release.config.js to semantic-release.

gojanpaolo avatar Feb 27 '24 03:02 gojanpaolo

The workaround with -e flag didn't actually work because v23 is not calling semantic-release-monorepo plugin. We downgraded to v22 for now.

e.g. for analyzeCommits step, v23 does this

[semantic-release] › ℹ  Start step "analyzeCommits" of plugin "@semantic-release/commit-analyzer"
[semantic-release] [@semantic-release/commit-analyzer] › ℹ  Analyzing commit: ...

And with v22

[semantic-release] › ℹ  Start step "analyzeCommits" of plugin "[Function: semantic-release-monorepo]"
[semantic-release] [[Function: semantic-release-monorepo]] › ℹ  Start step "analyzeCommits" of plugin "@semantic-release/commit-analyzer"

gojanpaolo avatar Feb 27 '24 16:02 gojanpaolo

This is also discussed in https://github.com/semantic-release/semantic-release/discussions/3163

peikk0 avatar Apr 29 '24 05:04 peikk0