diff --git a/.github/workflows/build-beta.yml b/.github/workflows/build-beta.yml index d46e292..7204a0e 100644 --- a/.github/workflows/build-beta.yml +++ b/.github/workflows/build-beta.yml @@ -2,18 +2,26 @@ name: build-beta on: push: - branches: [ beta ] + branches: + - beta pull_request: - branches: [ beta ] + branches: + - beta jobs: build: - runs-on: macos-latest steps: - - uses: actions/checkout@v3 - - name: Build - run: swift build -v - - name: Run tests - run: swift test -v + - uses: actions/checkout@v3 + # Use until swift 6 support is added to the default setup-swift action + # https://github.com/swift-actions/setup-swift + # https://github.com/swift-actions/setup-swift/pull/684 + # - uses: swift-actions/setup-swift@v2.2 + - uses: JoelBCarter/setup-swift@feat/swift-6 + with: + swift-version: "6.0" + - name: Build + run: swift build -v + - name: Run tests + run: swift test -v diff --git a/.github/workflows/build-main.yml b/.github/workflows/build-main.yml index 68f4371..04a22d9 100644 --- a/.github/workflows/build-main.yml +++ b/.github/workflows/build-main.yml @@ -2,18 +2,26 @@ name: build-main on: push: - branches: [ main ] + branches: + - main pull_request: - branches: [ main ] + branches: + - main jobs: build: - runs-on: macos-latest steps: - - uses: actions/checkout@v3 - - name: Build - run: swift build -v - - name: Run tests - run: swift test -v + - uses: actions/checkout@v3 + # Use until swift 6 support is added to the default setup-swift action + # https://github.com/swift-actions/setup-swift + # https://github.com/swift-actions/setup-swift/pull/684 + # - uses: swift-actions/setup-swift@v2.2 + - uses: JoelBCarter/setup-swift@feat/swift-6 + with: + swift-version: "6.0" + - name: Build + run: swift build -v + - name: Run tests + run: swift test -v diff --git a/Package.swift b/Package.swift index a5a22c0..8ca1c52 100644 --- a/Package.swift +++ b/Package.swift @@ -1,4 +1,4 @@ -// swift-tools-version:5.3 +// swift-tools-version:6.0 // The swift-tools-version declares the minimum version of Swift required to build this package. import PackageDescription @@ -17,10 +17,7 @@ let package = Package( ], dependencies: [ .package(url: "https://github.com/Alamofire/Alamofire.git", .upToNextMajor(from: "5.2.0")), - .package( - name: "secp256k1", - url: "https://github.com/21-DOT-DEV/swift-secp256k1", - "0.18.0"..."0.18.0"), + .package(url: "https://github.com/21-DOT-DEV/swift-secp256k1", "0.18.0"..."0.18.0"), ], targets: [ // Targets are the basic building blocks of a package. A target can define a module or a test suite. @@ -28,10 +25,15 @@ let package = Package( .target(name: "keccak"), .target( name: "XyoClient", - dependencies: ["Alamofire", "secp256k1", "keccak"]), + dependencies: [ + .product(name: "secp256k1", package: "swift-secp256k1"), + "Alamofire", + "keccak" + ] + ), .testTarget( name: "XyoClientTests", dependencies: ["XyoClient"]) ], - swiftLanguageVersions: [.v5, .v4_2] + swiftLanguageModes: [.v5, .v4_2] )