Setting CFBundleVersion ourselves

Is there a way for me to set CFBundleVersion before TestFlight and/or Notarization actions occur and have it stick? When I've tried doing this with ci_scripts or Script Phases, the system overwrites CFBundleVersion with the Xcode Cloud build number before publishing to TestFlight or notarizing.

We have a rather odd setup where we have two apps which are built from the same source & historically have used identical build numbers. So e.g. App A build 3 is built from the same commit as App B build 3. We have a bunch of tooling & processes which assume this, but it's really tough to achieve on Xcode Cloud because the build numbers for two different projects get out of sync really quickly.

Thanks  @DTS Engineer ! But unfortunately that only sets the next build number, it doesn't allow me to set CFBundleVersion to an arbitrary number.

The issue is that because 2 different apps requires having 2 different workflows, manually setting the two different "next build numbers" to be the same value will get out of sync very quickly.

Setting CFBundleVersion ourselves
 
 
Q