renovatebot / presets

48 stars 54 forks source link

Automate publishing and dependencies #11

Closed rarkins closed 4 years ago

rarkins commented 6 years ago

e.g. group depends on monorepo

ChristianMurphy commented 6 years ago

Lerna could be a good option, https://lernajs.io It's specialty is managing linked dependencies.

the workflow would look something like

$ lerna publish
? Select a new version (currently 1.1.4) 
❯ Patch (1.1.5) 
  Minor (1.2.0) 
  Major (2.0.0) 
  Prepatch (1.1.5-alpha.0) 
  Preminor (1.2.0-alpha.0) 
  Premajor (2.0.0-alpha.0) 
  Custom Prerelease 
  Custom Version 

select the version, the lerna builds a dependency tree of code in the monorepo, releasing leaf nodes/projects first, and working up the tree to parent nodes/projects.

The only gotcha I've run into so far is with two factor authentication, see https://github.com/lerna/lerna/issues/1091 where the OTP currently needs to be added as an ENV variable.

NPM_CONFIG_OTP=123456 lerna publish
viceice commented 4 years ago

superseeded by #202, so can be closed