Versioning should be taken care of by the release mechanism. Example of release mechanism: https://github.com/spinalcordtoolbox/spinalcordtoolbox/releases