Release-Branch GitLab Flow and semantic versioning

So. I am currently creating my first project, that I’m going to release to the public. I decided to use the release-branch GitLab flow as described on this page. But I still can’t wrap my head around how that would work with versioning.

For example: My project is in version 1.0.0 and I want to implement some features. Do I bump the version first and then write my stuff? Or do I write my stuff first, then bump the version?

Both ways come with some more or less ugly downsides. The former would mean, that a hotfix would cause some versioning problems (I would have to decrease the minor version, increase patch version, push to master, cherry-pick to release. Then in another commit increase minor version, decrease patch version, push to master).

The latter would be less complicated but would mean that I would develop new features using a version number that has already been released which is a little bit confusing and could lead to errors/collisions in repository systems like sonatype nexus.

Thanks in advance :slight_smile: