Publish a Swift package

You can publish a package to make it available to other projects and packages. First, you create a remote repository for your package, then you commit your files and add a version tag to the commit. Later, clients will use the Git repository URL and version tag to create a package dependency.

  1. To create a remote repository, either add an existing remote to your local repository or create a remote from a local source code repository of the package.

  2. Then commit your changes to the remote repository.

  3. To create a version tag, tag the commit with the version number.

    In the sheet that appears, enter a package version as a three period-separated integer, such as 2.1.4.

  4. Push your changes to a remote repository.

    In the sheet that appears, check the “Include tags” box before you click the Push button.

To learn more, go to Publishing a Swift Package with Xcode.

See alsoCreate a Swift packageLink a target to a package product