Skip to content

Lerna Deploy

jaikme edited this page Aug 23, 2023 · 4 revisions

⚠️ REMEMBER: Before starting release flow, open a PR from your branch to develop, to isolate the new code/logic you are deploying

1 (Optional) - If you want to check the next version:

echo 'n' | lerna version # using No (n) to NOT apply

2 - Then go to release next branch (create if it not exist)

git checkout release/next

3 (Optional) - If it doesn't exist, the new branch needs exist remotely

git push -u origin release/next

4 (Optional) - Pull changes from master (may have hotfixes):

git pull origin master --no-ff

5.a - Pull changes from develop:

git pull origin develop --no-ff

5.b - Push back what you brought:

git push

6 - Install dependencies(again, because can exist new deps from modified source), so run:

yarn

7 - Now apply lerna version to your release branch

## $ lerna version # use Yes this time (y)

You can use explicit ou semver keyword:

lerna version 1.0.1 # explicit

lerna version patch # semver keyword(only bump patch eg.)

8 - The next steps needs made manually. Open a PR and code wait review approval.

9 - After PR aproved, checkout master branch updated, and run the command to deploy no NPM:

git checkout master
git pull
yarn --frozen-lockfile
lerna publish from-package

10 - Then update develop back with another PR or by command:

git checkout develop
git pull origin master --no-ff && git push