If you don't change the build number in unity, the build won't push to AppStoreConect.
Put this script in the editor folder.
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEditor;
public class AutoIncrementVersionCodeInCloudBuild : MonoBehaviour
{
#if UNITY_CLOUD_BUILD
public static void PreExport(UnityEngine.CloudBuild.BuildManifestObject manifest)
{
string buildNumber = manifest.GetValue("buildNumber", "0");
Debug.LogWarning("Setting build number to " + buildNumber);
PlayerSettings.Android.bundleVersionCode = int.Parse(buildNumber);
PlayerSettings.iOS.buildNumber = buildNumber;
}
#endif
}
Then, in your unity dashboard config for cloud build. In advanced options, set the following: