Automate the way you keep up with dependency changes in your Swift Package

Automate the way you keep up with dependency changes in your Swift Package


1 min read

Do you need help to keep your Swift package dependencies up-to-date?

GitHub action swift-package-dependencies-check is the ideal foundation to automate the process of

  • periodically checking for outdated versions and
  • creating a pull request to update Package.resolved file.

But how to check what's new or changed?

It was cumbersome to gather the release notes URLs of the outdated packages until now. But the SwiftPackageIndex team stepped up and recently published command-line tool swift-release-notes, which gives you a list of links to the release notes for all the packages that have pending updates.

I genuinely believe this makes life easier for Swift Package developers, so I worked on the GitHub action to leverage swift-release-notes and add release URLs to the pull request.

Pull Request created by reusable workflow

I created a workflow that you can reuse in your Swift Package to make it super easy.

name: Swift Package Dependencies

    - cron: '0 8 * * *' # every day at AM 8:00
    uses: MarcoEidinger/swift-package-dependencies-check/.github/workflows/reusableWorkflow.yml@v2
      commit-message: 'chore: update package dependencies'

All those changes are available in the latest version (v2) of the GitHub action.

Give it a try, and you won't be surprised by your dependencies.