That probably would work, but after a little more digging wasn't what fixed it. It seems like the supported platforms only specifies minimum deployment targets (SupportedPlatform: linux not allowed? - #2 by mickael). Adding in a target for macOS resolved the issue. This doesn't restrict the allowed platforms like I would have expected.
E.g. this was the change that I needed to add the platforms
key:
let package = Package(
name: "PackageName",
platforms: [
.macOS(.v13),
],
...
)