Xcode is unable to fetch your private Swift Package Manager dependencies and because of that, the Xcode Test or the Xcode Archive Step fails.
By default, Xcode isn't using the system source control manager settings. To make it do so:
Open the relevant Step in the Workflow Editor.
Find and open the Debug input group.
In the Additional options for xcodebuild call input, pass the following flag:
Building Swift Packages or Apps that Use Them in Continuous Integration Workflows