We should add a step in our CI that verifies if the branch contains the right version. For example, for branch 6.3.x the gradle.properties file should contain the version in the 6.3.* pattern.

One idea is to create a custom Gradle task that verifies that and run it as part of the check task.

Related to: - https://github.com/spring-projects/spring-security/issues/15028