diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..f64edae --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,25 @@ +name: CI +on: + pull_request: +jobs: + build: + runs-on: ${{ matrix.xcode == '11' && 'macos-10.15' || 'macos-11' }} + strategy: + matrix: + platform: + - macOS + - tvOS + - iOS + - watchOS + xcode: + - 11 + - 12 + - 13 + steps: + - uses: actions/checkout@v2 + - run: rm -rf PMKStoreKit.xcodeproj + - uses: mxcl/xcodebuild@v1 + with: + xcode: ${{ matrix.xcode }} + platform: ${{ matrix.platform }} + action: build diff --git a/.gitignore b/.gitignore index bec9c17..a20bdc5 100644 --- a/.gitignore +++ b/.gitignore @@ -2,4 +2,5 @@ *.xcscmblueprint /Carthage /.build -.DS_Store \ No newline at end of file +.DS_Store +/Package.resolved diff --git a/Package.swift b/Package.swift index 32552be..302e2d3 100644 --- a/Package.swift +++ b/Package.swift @@ -1,23 +1,26 @@ -// swift-tools-version:4.0 +// swift-tools-version:5.0 import PackageDescription let name = "PMKStoreKit" let pkg = Package(name: name) +pkg.platforms = [ + .watchOS("6.2") +] pkg.products = [ - .library(name: name, targets: [name]), + .library(name: name, targets: [name]), ] -pkg.swiftLanguageVersions = [3, 4] +pkg.swiftLanguageVersions = [.v4, .v5] pkg.dependencies = [ - .package(url: "https://github.com/mxcl/PromiseKit.git", from: "6.0.0") + .package(url: "https://github.com/mxcl/PromiseKit.git", from: "6.0.0") ] let target: Target = .target(name: name) target.path = "Sources" target.exclude = [ "SKRequest+AnyPromise.h", - "SKRequest+AnyPromise.m", - "\(name).h", + "SKRequest+AnyPromise.m", + "\(name).h", ] target.dependencies = ["PromiseKit"] diff --git a/Package@swift-4.0.swift b/Package@swift-4.0.swift new file mode 100644 index 0000000..32552be --- /dev/null +++ b/Package@swift-4.0.swift @@ -0,0 +1,24 @@ +// swift-tools-version:4.0 +import PackageDescription + +let name = "PMKStoreKit" + +let pkg = Package(name: name) +pkg.products = [ + .library(name: name, targets: [name]), +] +pkg.swiftLanguageVersions = [3, 4] +pkg.dependencies = [ + .package(url: "https://github.com/mxcl/PromiseKit.git", from: "6.0.0") +] + +let target: Target = .target(name: name) +target.path = "Sources" +target.exclude = [ + "SKRequest+AnyPromise.h", + "SKRequest+AnyPromise.m", + "\(name).h", +] +target.dependencies = ["PromiseKit"] + +pkg.targets = [target] diff --git a/Package@4.2.swift b/Package@swift-4.2.swift similarity index 100% rename from Package@4.2.swift rename to Package@swift-4.2.swift