Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
63 changes: 54 additions & 9 deletions .github/workflows/swift.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,63 @@ name: Swift

on:
push:
branches: [ main ]
branches: [main]
pull_request:
branches: [ main ]
branches: [main]
workflow_dispatch:

permissions:
contents: read

jobs:
build:
test:
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-24.04
swift: '6.0.3'
- os: macos-15
swift: '6.4.0'
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v6
- name: Import Swift signing keys
if: runner.os == 'Linux'
run: curl --fail --silent --show-error --location --compressed https://www.swift.org/keys/all-keys.asc | gpg --batch --import
# v3 uses Swiftly; v2's fixed release list does not include Swift 6.4.
- uses: swift-actions/[email protected]
with:
swift-version: ${{ matrix.swift }}
- run: swift --version
- name: Validate package metadata
run: swift package dump-package
- name: Build with concurrency checks
run: swift build -Xswiftc -warnings-as-errors
- name: Offline tests
run: swift test
- name: Standalone distribution and README examples
run: bash scripts/verify-package.sh

runs-on: macos-latest
public-mock:
runs-on: macos-15
steps:
- uses: actions/checkout@v6
- uses: swift-actions/[email protected]
with:
swift-version: '6.4.0'
- name: Credential-free public mock integration
env:
LISTEN_API_SWIFT_INTEGRATION: '1'
run: swift test --filter MockIntegrationTests

cocoapods:
runs-on: macos-15
steps:
- uses: actions/checkout@v4
- name: Build
run: swift build -v
- name: Run tests
run: swift test -v
- uses: actions/checkout@v6
- uses: ruby/setup-ruby@v1
with:
ruby-version: '3.3'
- run: gem install cocoapods -v 1.16.2 --no-document
- name: Validate both Apple platforms
run: pod lib lint PodcastAPI.podspec --platforms=ios,osx --skip-tests
4 changes: 4 additions & 0 deletions .spi.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
version: 1
builder:
configs:
- documentation_targets: [PodcastAPI]
14 changes: 5 additions & 9 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -1,31 +1,27 @@
// swift-tools-version:5.3
// The swift-tools-version declares the minimum version of Swift required to build this package.
// swift-tools-version:6.0

import PackageDescription

let package = Package(
name: "PodcastAPI",
platforms: [.macOS(.v13), .iOS(.v16)],
products: [
// Products define the executables and libraries a package produces, and make them visible to other packages.
.library(
name: "PodcastAPI",
targets: ["PodcastAPI"]),
.executable(
name: "ExampleCommandLineApp",
targets: ["ExampleCommandLineApp"]),
],
dependencies: [
],
targets: [
// Targets are the basic building blocks of a package. A target can define a module or a test suite.
// Targets can depend on other targets in this package, and on products in packages this package depends on.
.target(
name: "PodcastAPI",
dependencies: []),
.testTarget(
name: "PodcastAPITests",
dependencies: ["PodcastAPI"]),
.target(
dependencies: ["PodcastAPI"],
resources: [.copy("api-contract.json")]),
.executableTarget(
name: "ExampleCommandLineApp",
dependencies: ["PodcastAPI"]),
]
Expand Down
15 changes: 7 additions & 8 deletions PodcastAPI.podspec
Original file line number Diff line number Diff line change
@@ -1,18 +1,17 @@
Pod::Spec.new do |s|
s.name = "PodcastAPI"
s.version = "1.1.8"
s.version = "3.0.0"
s.summary = "The Official Swift Library for the Listen Notes Podcast API."
s.homepage = "https://www.listennotes.com/api/"
s.license = { :type => "MIT" }
s.license = { :type => "MIT", :file => "LICENSE" }
s.author = { "Listen Notes, Inc." => "[email protected]" }
s.social_media_url = "https://twitter.com/ListenNotes"

s.requires_arc = true
s.swift_version = "5.0"
s.osx.deployment_target = "13.3.99"
s.ios.deployment_target = "16.4"
# s.watchos.deployment_target = "3.0"
# s.tvos.deployment_target = "9.0"
s.swift_version = "6.0"
s.module_name = "PodcastAPI"
s.osx.deployment_target = "13.0"
s.ios.deployment_target = "16.0"
s.source = { :git => "https://github.com/ListenNotes/podcast-api-swift.git", :tag => "#{s.version}" }
s.source_files = "Sources/PodcastAPI/*.swift"
s.source_files = "Sources/PodcastAPI/**/*.swift"
end
Loading
Loading