We're serving a Node.js application and operating branch policy on GitHub such as:
main
: Production environment release basedevelop
: Development environment (beta) release base
Basically, we're writing some code on a new branch from the develop
branch and merging it into the develop
and then merging the develop
into the main
.
In hotfix cases, fix a code on a new branch from the main
and then merge it into develop
and main
.
The release is processed by semantic-release, and automatically changes the package.json
file and CHANGELOG.md
file in CI/CD pipeline.
Which means that semantic-release commit to the release target branch and the file gets changed.
So, we have a problem in the case below:
- If there are changes in the
develop
branch, a version is increased as a beta. - If there are hotfixes in the
main
branch, a version is increased. - When merging the
main
into thedevelop
, occurring conflict.
Because, the files changed and committed them at the same time.
This case is trying to reflect the recent version into thedevelop
branch.
We're expecting the same phenomenon when merging thedevelop
into themain
.
We're feeling the hassle to fix the conflict and worry about the wrong change when occurred this case.
Should we have to DO NOT MERGE the main
into the develop
?
We want to know how do you build your release pipeline.
Thank you.