- We are in version 0.1.0 with tag.
- Create branches master, release and develop
-
Checkout develop
-
bump version as
bumpversion minor -m '[skip ci] new version'This creates the tag
0.2.0.dev0and the message header deactivates the execution of any GitHub CI -
Push develop to origin as:
git push origin develop --tags
-
From
develop, start a feature branch:git checkout -b feat-01
-
Commit your changes and push your branch to origin.
git push origin feat-01
-
Create the PR from
feat-01todevelopusing the github interface. -
Accepting the PR will merge
feat-01branch intodevelop(1 commit). -
The
GitHub Actionwill use an extra commit to bump and push the new version tag into 'develop', in this example would be0.2.0.dev1. -
Once the
GitHub Actionis finished, you can pull the repo again and update your develop branch and keep working:git fetch origin git checkout develop git pull origin develop
-
Checkout
releasebranch and mergedevelopinto it.git checkout release git merge --no-ff develop
-
Bump the version to release as follows:
bumpversion release --no-commit
This will bump the version creating a new tag as
x.y.z.devN->x.y.z.rc0 -
Modify the commit message by adding the
[skip ci]on the header, to avoid bumping the version on commit. -
Push
releasebranch to origin.git push origin release --tags
-
At this stage,
releasebranch is ready for test. See the following section to work on the release branch. -
Checkout
developbranch and update the version to restart the development of a new potentialreleasebranch.git checkout develop bumpversion minor -m '[skip ci] Update minor version'This will bump the version as
x.y.z.devN->x.y+1.0.dev0. Then you candevelopto origin.git push origin develop --tags
After these actions, both
developandreleasebranches are ready to keep working.
Any change on the release branch can be committed and pushed directly to origin/release
or can be integrated via PR (to be decided). Both actions will automatically bump the
release candidate version as x.y.z.rcN -> x.y.z.rcN+1.
The changes committed into the release branch need to be brought
back into develop branch MANUALLY, in order to solve the conflicts regarding
the version number. This conflict will be solved by resume the develop branch
versioning, as if it was a standard feature branch from develop.
We cannot use a PR in this merge from release to develop, cause the
resolution of the conflicts would create a merge from develop to release,
cause the CI cannot be skipped in the github IDE interface. So:
git checkout develop
git merge --no-ff releaseAt this point you need to solve the conflicts regarding the versioning by
resuming the develop version. Once fixed, commit your changes to develop
which will trigger the version bumping automatically.
git push origin developFinally, update your local develop branch to keep developing on:
git pull origin develop-
Once accepted the release candidate branch, Checkout the
masterbranch and merge thereleasebranch.git checkout master git merge --no-ff release
-
Bump the version to release as follows:
bumpversion release --no-commit
This will bump the version creating a new tag as
x.y.z.rcN->x.y.z -
Modify the commit message by adding the
[skip ci]on the header, to avoid bumping the version on commit. -
Push
masterbranch to origin.git push origin master --tags
-
At this stage,
masterbranch is ready for test.(Any change on the master branch MUST be committed directly into it and merged back into develop via
PR. ThisPRwill have conflicts regarding the version number, which MUST follow the develop branch versioning, as if it would be afeaturebranch.)
Any change on the release branch can be committed and pushed directly to origin/master
or can be integrated via PR (to be decided). Both actions will automatically bump the
master version as x.y.z -> x.y.z+1.
The changes committed into the master branch need to be brought
back into develop branch MANUALLY, in order to solve the conflicts regarding
the version number. This conflict will be solved by resume the develop branch
versioning, as if it was a standard feature branch from develop.
We cannot use a PR in this merge from master to develop, cause the
resolution of the conflicts would create a merge from develop to master,
cause the CI cannot be skipped in the github IDE interface. So:
git checkout develop
git merge --no-ff masterAt this point you need to solve the conflicts regarding the versioning by
resuming the develop version. Once fixed, commit your changes to develop
which will trigger the version bumping automatically.
git push origin developFinally, update your local develop branch to keep developing on:
git pull origin develop