Fix skipped post-publish jobs in release mode (#57479)