---
title: Continuous Integration Workflows
framework: swift-package-manager
role: article
role_heading: Article
path: swift-package-manager/documentation/packagemanagerdocs/continuousintegration
---

# Continuous Integration Workflows

Build Swift packages with an existing continuous integration setup and prepare apps that consume package dependencies within an existing CI pipeline.

## Overview

Overview Continuous integration (CI) is the process of automating and streamlining the building, analyzing, testing, archiving, and publishing of your apps to ensure that they’re always in a releasable state. Most projects that contain or depend on Swift packages don’t require additional configuration. Use the Expected Version of a Package Dependency To ensure a CI workflow’s reliability, verify it uses the appropriate version of package dependencies. SwiftPM records the result of dependency resolution in the file Package.resolved, at the top-level of the package. When available, it’s used when performing dependency resolution. Run swift package update to update dependencies to the latest eligible versions and update Package.resolved. For more information on resolving and updating dependencies, see Resolving and updating dependencies. Provide Credentials To resolve package dependencies that require authentication, such as private packages, provide credentials to your CI setup. Package manager honors the machine’s SSH configuration - there’s no additional setup required. For private package, use the SSH-based Git URLs and configure SSH credentials. You may also need to set up a known_hosts file in the ~/.ssh directory of the user that runs your CI tasks. CI services like Jenkins, Github Action, TravisCI, and CircleCI provide ways to set up SSH keys or other techniques to access private repositories. Since Package manager uses git to clone the repositories there’s no additional setup required; Package manager honors the machine’s SSH and Git configuration. Using xcodebuild When building on macOS based CI hosts you can use the command-line tool xcodebuild. xcodebuild uses Xcode’s built-in Git tooling to connect to repositories. In many cases, you don’t need to make changes to how xcodebuild connects to them. However, some use cases require you use the git configuration — for example URL remapping, the use of proxies, or advanced SSH configurations. To have xcodebuild use your Mac’s Git installation and configuration instead of Xcode’s built-in Git tooling, pass -scmProvider system to the xcodebuild command. For more information on using xcodebuild in continuous integration workflows, visit Building Swift packages or apps that use them in continuous integration workflows.

## See Also

### Guides

- [Creating a Swift package](swift-package-manager/documentation/packagemanagerdocs/creatingswiftpackage.md)
- [Setting the Swift tools version](swift-package-manager/documentation/packagemanagerdocs/settingswifttoolsversion.md)
- [Adding dependencies to a Swift package](swift-package-manager/documentation/packagemanagerdocs/addingdependencies.md)
- [Resolving and updating dependencies](swift-package-manager/documentation/packagemanagerdocs/resolvingpackageversions.md)
- [Creating C language targets](swift-package-manager/documentation/packagemanagerdocs/creatingclanguagetargets.md)
- [Using build configurations](swift-package-manager/documentation/packagemanagerdocs/usingbuildconfigurations.md)
- [Packaging based on the version of Swift](swift-package-manager/documentation/packagemanagerdocs/swiftversionspecificpackaging.md)
- [Bundling resources with a Swift package](swift-package-manager/documentation/packagemanagerdocs/bundlingresources.md)
- [Releasing and publishing a Swift package](swift-package-manager/documentation/packagemanagerdocs/releasingpublishingapackage.md)
- [Generating Software Bill of Materials (SBOM)](swift-package-manager/documentation/packagemanagerdocs/generatingsboms.md)
- [Plugins](swift-package-manager/documentation/packagemanagerdocs/plugins.md)
- [Module Aliasing](swift-package-manager/documentation/packagemanagerdocs/modulealiasing.md)
- [Using a package registry](swift-package-manager/documentation/packagemanagerdocs/usingswiftpackageregistry.md)
- [Package Collections](swift-package-manager/documentation/packagemanagerdocs/packagecollections.md)
- [Using shell completion scripts](swift-package-manager/documentation/packagemanagerdocs/usingshellcompletion.md)
