monorepo release flow: lerna + GitHub Release's Automatically generated release notes
MIT License
This example monorepo shows release flow with lerna + GitHub Release's Automatically generated release notes
You can publish packages in monorepo via CI(Pattern A) or Local(Pattern B).
UseCase:
Steps:
lerna.json
's version
and packages/*/package.json
's version
Warning If the publishing(Step 5) is failed, you can re-run the workflow, or You can move to Pattern A-5.
Pattern A's step 5 is failed in sometimes because npm registry is down or some package is broken.
You can re-publish it manually, but you can use CI for re-publishing.
UseCase:
Steps:
Warning This manual workflow requires updating version before executing. So, Most use-cause is for retrying to publish if failed on Pattern A. If you want to fix something, It is preferable to start again from A.
Note No matter how many times this workflow is executed, the result is the same.
- No publish if packages are already published
- No add tag if git tag is added
- Overwrite release note if GitHub Release is already created
You can publish packages and generate release note from local.
Requirements:
UseCase:
You can just run following command:
npm run versionup && npm run release && gh release create --generate-notes "$(git describe --tags --abbrev=0)"
This command do next steps:
lerna.json
's version
and packages/*/package.json
's version
if you want to use this release flow, you can use migration script.
curl -fsSL https://raw.githubusercontent.com/azu/monorepo-github-releases/main/migrate.sh | bash
This migration script support a single npm package and lerna.
See Releases page.
This monorepo uses GitHub Packages Registry.
npm package name link to repository owner on GitHUb Packages Registry.
So, You need to change each packages/*/package.json
after fork this repository.
@{you}/<name>
Pull requests and stars are always welcome!
git checkout -b my-new-feature
git commit -am 'Add some feature'
git push origin my-new-feature
MIT © azu