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
27 changes: 27 additions & 0 deletions .github/workflows/carthage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Carthage
on: [push, workflow_dispatch]

jobs:
build:
name: Build
runs-on: macOS-latest
steps:
- name: Checkout Code
uses: actions/checkout@v2

- name: Install Carthage
run: |
brew update
brew install carthage

- name: Create Cartfile
run: |
# Delete all of the old tags (if any) and create a new tag for building
git tag | xargs git tag -d
git tag 1.0

echo "git \"file://$(pwd)\"" > ./Cartfile

- name: Build
run: |
./scripts/carthage.sh update
23 changes: 23 additions & 0 deletions .github/workflows/cocoapods.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Cocoapods
on: [push, workflow_dispatch]

jobs:
lint:
name: Lint
runs-on: macOS-latest
steps:
- name: Checkout Code
uses: actions/checkout@v2

- name: Setup Cocoapods
uses: maxim-lobanov/setup-cocoapods@v1
with:
version: latest

- name: Lint (Dynamic Library)
run: |
pod lib lint --skip-tests

- name: Lint (Static Library)
run: |
pod lib lint --use-libraries --skip-tests
49 changes: 49 additions & 0 deletions .github/workflows/upload-assets.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Upload Assets
on:
release:
types: [published]

jobs:
build:
name: Upload Assets
runs-on: macOS-latest
env:
TMPDIR: /tmp/.keyvalueobservation.xcframework.build

steps:
- name: Checkout Code
uses: actions/checkout@v2

- name: Build
run: |
./scripts/xcframework.sh -output ${TMPDIR}/KeyValueObservation.xcframework

- name: Create Zip
run: |
cd ${TMPDIR}
zip -rX KeyValueObservation.xcframework.zip KeyValueObservation.xcframework

- name: Upload Zip
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ${{ env.TMPDIR }}/KeyValueObservation.xcframework.zip
asset_name: KeyValueObservation.xcframework.zip
asset_content_type: application/zip

- name: Create Tar
run: |
cd ${TMPDIR}
tar -zcvf KeyValueObservation.xcframework.tar.gz KeyValueObservation.xcframework

- name: Upload Tar
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ${{ env.TMPDIR }}/KeyValueObservation.xcframework.tar.gz
asset_name: KeyValueObservation.xcframework.tar.gz
asset_content_type: application/gzip
17 changes: 17 additions & 0 deletions .github/workflows/xcframework.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: XCFramework
on: [push, workflow_dispatch]

jobs:
build:
name: Build
runs-on: macOS-latest
env:
TMPDIR: /tmp/.keyvalueobservation.xcframework.build

steps:
- name: Checkout Code
uses: actions/checkout@v2

- name: Build
run: |
./scripts/xcframework.sh -output ${TMPDIR}/KeyValueObservation.xcframework
102 changes: 102 additions & 0 deletions .github/workflows/xcodebuild.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
name: Xcode Project
on: [push, workflow_dispatch]

jobs:
ios:
name: iOS
runs-on: macOS-latest

steps:
- name: Checkout Code
uses: actions/checkout@v2

- name: Build iOS
run: |
xcodebuild -project KeyValueObservation.xcodeproj -scheme "KeyValueObservation" -destination "generic/platform=iOS" -configuration Debug

- name: Build iOS Simulator
run: |
xcodebuild -project KeyValueObservation.xcodeproj -scheme "KeyValueObservation" -destination "generic/platform=iOS Simulator" -configuration Debug

- name: Test
run: |
xcodebuild -project KeyValueObservation.xcodeproj -scheme "KeyValueObservation" -testPlan "KeyValueObservationTests" -destination "platform=iOS Simulator,name=iPhone 12 Pro Max" -configuration Debug ONLY_ACTIVE_ARCH=YES test

maccatalyst:
name: Mac Catalyst
runs-on: macOS-latest

steps:
- name: Checkout Code
uses: actions/checkout@v2

- name: Build
run: |
xcodebuild -project KeyValueObservation.xcodeproj -scheme "KeyValueObservation" -destination "generic/platform=macOS,variant=Mac Catalyst" -configuration Debug

- name: Test
run: |
xcodebuild -project KeyValueObservation.xcodeproj -scheme "KeyValueObservation" -testPlan "KeyValueObservationTests" -destination "platform=macOS,variant=Mac Catalyst" -configuration Debug ONLY_ACTIVE_ARCH=YES test

macos:
name: macOS
runs-on: macOS-latest

steps:
- name: Checkout Code
uses: actions/checkout@v2

- name: Build
run: |
xcodebuild -project KeyValueObservation.xcodeproj -scheme "KeyValueObservation macOS" -destination "generic/platform=macOS" -configuration Debug

- name: Test
run: |
xcodebuild -project KeyValueObservation.xcodeproj -scheme "KeyValueObservation macOS" -testPlan "KeyValueObservation macOS Tests" -configuration Debug -enableCodeCoverage YES test

- name: Upload Code Coverage
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
uses: codecov/codecov-action@v2
with:
token: ${{ secrets.CODECOV_TOKEN }}
verbose: true

tvos:
name: tvOS
runs-on: macOS-latest

steps:
- name: Checkout Code
uses: actions/checkout@v2

- name: Build tvOS
run: |
xcodebuild -project KeyValueObservation.xcodeproj -scheme "KeyValueObservation tvOS" -destination "generic/platform=tvOS" -configuration Debug

- name: Build tvOS Simulator
run: |
xcodebuild -project KeyValueObservation.xcodeproj -scheme "KeyValueObservation tvOS" -destination "generic/platform=tvOS Simulator" -configuration Debug

- name: Test
run: |
xcodebuild -project KeyValueObservation.xcodeproj -scheme "KeyValueObservation tvOS" -testPlan "KeyValueObservation tvOS Tests" -destination "platform=tvOS Simulator,name=Apple TV 4K" -configuration Debug ONLY_ACTIVE_ARCH=YES test

watchos:
name: watchOS
runs-on: macOS-11

steps:
- name: Checkout Code
uses: actions/checkout@v2

- name: Build watchOS
run: |
xcodebuild -project KeyValueObservation.xcodeproj -scheme "KeyValueObservation watchOS" -destination "generic/platform=watchOS" -configuration Debug

- name: Build watchOS Simulator
run: |
xcodebuild -project KeyValueObservation.xcodeproj -scheme "KeyValueObservation watchOS" -destination "generic/platform=watchOS Simulator" -configuration Debug

- name: Test
run: |
xcodebuild -project KeyValueObservation.xcodeproj -scheme "KeyValueObservation watchOS" -testPlan "KeyValueObservation watchOS Tests" -destination "platform=watchOS Simulator,name=Apple Watch Series 6 - 44mm" -configuration Debug ONLY_ACTIVE_ARCH=YES test
17 changes: 0 additions & 17 deletions .travis.yml

This file was deleted.

14 changes: 9 additions & 5 deletions KeyValueObservation.podspec
Original file line number Diff line number Diff line change
@@ -1,25 +1,29 @@
Pod::Spec.new do |s|

s.name = "KeyValueObservation"
s.version = "1.0.3"
s.version = "1.0.4"
s.summary = "A small KVO helper library"
s.description = <<-DESC
A small KVO helper library that provides a NSObject and a NSArray category for observing key value changes using blocks
DESC

s.homepage = "https://github.com/SomeRandomiOSDev/KeyValueObservation"
s.license = "MIT"
s.author = { "Joseph Newton" => "somerandomiosdev@gmail.com" }
s.author = { "Joe Newton" => "somerandomiosdev@gmail.com" }

s.ios.deployment_target = '8.0'
s.ios.deployment_target = '9.0'
s.macos.deployment_target = '10.10'
s.tvos.deployment_target = '9.0'
s.watchos.deployment_target = '2.0'

s.source = { :git => "https://github.com/SomeRandomiOSDev/KeyValueObservation.git", :tag => s.version.to_s }

s.public_header_files = 'KeyValueObservation/NSObject+KeyValueObservation.h', 'KeyValueObservation/NSArray+KeyValueObservation.h', 'KeyValueObservation/SRDKeyValueObservation.h', 'KeyValueObservation/SRDKeyValueObservedChange.h', 'KeyValueObservation/SRDKVOInfo.h'
s.source_files = 'KeyValueObservation/**/*.{h,m}'
s.test_spec do |ts|
ts.source_files = 'Tests/KeyValueObservationTests/*.m'
end

s.public_header_files = 'Sources/KeyValueObservation/NSObject+KeyValueObservation.h', 'Sources/KeyValueObservation/NSArray+KeyValueObservation.h', 'Sources/KeyValueObservation/SRDKeyValueObservation.h', 'Sources/KeyValueObservation/SRDKeyValueObservedChange.h', 'Sources/KeyValueObservation/SRDKVOInfo.h'
s.source_files = 'Sources/KeyValueObservation/**/*.{h,m}'
s.frameworks = 'Foundation'
s.requires_arc = true

Expand Down
Loading