Skip to content

Commit

Permalink
Merge pull request #17 from wacumov/master
Browse files Browse the repository at this point in the history
Add SwiftPM support
  • Loading branch information
frozzare authored Oct 2, 2023
2 parents 4e6939a + 948310a commit d6a84c4
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/swift.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ jobs:

steps:
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4
- name: Test as package
run: swift test
- name: CocoaPod Install
run: |
cd PersonnummerExample
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.DS_Store
.swiftpm/
.build/
23 changes: 23 additions & 0 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
// swift-tools-version: 5.6

import PackageDescription

let package = Package(
name: "Personnummer",
products: [
.library(name: "Personnummer", targets: ["Personnummer"]),
],
targets: [
.target(
name: "Personnummer",
dependencies: [],
path: "source"
),
.testTarget(
name: "PersonnummerTests",
dependencies: ["Personnummer"],
path: "PersonnummerExample/PersonnummerExampleTests",
exclude: ["Info.plist"]
),
]
)
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@ Small library to validate and format swedish personal identity numbers called "P
pod 'Personnummer', '~> 1.0.0'
```

### Swift Package Manager

```swift
.package(url: "https://github.com/personnummer/swift.git", from: "1.0.2")
```

## Usage

```swift
Expand Down

0 comments on commit d6a84c4

Please sign in to comment.