TL;DR
- Use the
develop
branch to make changes. - Create an
rc/*
branch fromdevelop
with the correct version based on the desired release. - This triggers the GitHub action for pre-release, generating a release candidate of the SDK.
- Once everything is confirmed to be working fine, merge the
rc
branch intomain
and delete it afterwards. - The GitHub action in the
main
branch will be triggered to release the new version of the SDK, generate and deploy the documentation to the GitHub page, and finally merge themain
branch back intodevelop
.
Approach
-
Development is done in the
develop
branch. Every change should be made in thedevelop
branch. Always use conventional commits.Example commits:
ci: update workflows
feat: update withdraw method
-
Once the development is complete, create a new branch from
develop
calledrc/*
, where the asterisk denotes the semantic version number.Example: If the commits contain the word
feat
, it will be a minor release. If the commits includefix
, it will be a patch release. If the footer of the commits includesBREAKING CHANGE
, it will be a major release. Decide which number to use for the creation of therc
branch based on your commits. -
After creating the
rc
branch, the GitHub action for pre-release is triggered. It tests and releases the pre-release version of the SDK in the format2.0.0-rc.1
. If any issues are found in therc.1
version, you can make changes directly to therc
branch. This will trigger the GitHub action again and release the nextrc
version, such as2.0.0-rc.2
, and so on. -
Once everything is confirmed to be working fine with the release candidate, merge the
rc
branch into themain
branch and delete therc
branch. This merge triggers another GitHub action to release the new version of the SDK, generate documentation, and deploy it to GitHub Pages. Finally, themain
branch is automatically merged back into thedevelop
branch.