Every release is generated manually while in a release/xxx
branch, which is branched from develop
.
- To prepare a release, checkout from
develop
to arelease/xxx
branch. - No features are added to this
release/xxx
branch. Only bug fixes, documentation generation, and other release-oriented tasks should go in this branch. - Whenever the release is tested and ready to be deployed, generate a new version to be merged to
develop
- Also merge the release branch to
develop
– which, at this time, could have more commits (and even received new features) develop
is the staging branch. When you're ready to deploy the new release to production and publish the package, mergedevelop
tomaster
, and create the release with the already created tag in GitHub. That will automatically publish the package tonpm
.
This way, we only commit to main
when we're ready to deploy to production. All other PRs are merged to develop
and tested there, or in the release/xxx
branches.
When the app is internally tested and approved, it's time to generate a release.
Make sure you're on a release/xxx
branch (e.g.: release/next
) with no uncommitted changes.
pnpm run release
pnpm run release --release-as X.X.X
# or
pnpm run release --release-as minor
pnpm run release --first-release
Check all available flags in https://www.npmjs.com/package/standard-version
- Check if our git status is clean and we're on a correct branch
- Bump version in package.json
- Generate changelog
- Commit these changes
- Tag this commit
- Push changes and tag to origin