CI: Keep version number inside source code?

We do not use gitlab for CI up to now, but we think about switching from jenkins to gitlab.

In our current set up we increase the version number after all tests passed.

The version number is stored in the source code.

This means that roughly 50% of all commits in a repo (useless) commits from CI.

How does the workflow of gitlab ci handle this by default?

(We test and release Python modules, but I think this should not matter much for this question)