Shields.io build badges (Swift versions/platforms) for your packages

In the summer of 2020, we announced our Swift Package Index build system that computes Swift version and platform compatibility for every package.

As part of that feature, we also added support for shields.io build badges that allow package owners to reference the compatibility data we compute in their Readmes. The badges show a summary of the Swift version and platform compatibility matrix for your package:

So if your package relies on a feature introduced in Swift 5.4, it'll show potential users of your package that it's compatible with 5.4 and above. If you support iOS, tvOS, and Linux, it'll show potential users that at a glance, too.

We've seen a lot of packages adopt these badges but it's perhaps still a feature of the Swift Package Index that many package authors don't know about. If that's you, you can browse to your package page on the Swift Package Index and click on "Do you maintain this package?" in the side bar.

This will take you the maintainer info page where you can copy a Markdown snippet tailored to be added to your Readme:

Let the Swift Package Index do the heavy lifting of determining your package's compatibility matrix!

Dave & Sven

11 Likes

Yes indeed! I was not aware of this and it's pretty cool because I was doing it manually until now.
<3

2 Likes

I stumbled across this last week, and thought I had just missed learning about it. It's a great capability, thank you!! (already added to a couple README files...)

1 Like