Skip to content

Commit b07aea8

Browse files
authored
Updates (#35)
* 🚚 Migrate to SPM structure * πŸ”§ Bump deployment target to iOS 11 * πŸ”§ Enable library evolution * πŸ”§ Update CI jobs * πŸ“ Update CHANGELOG
1 parent 6a88e6e commit b07aea8

23 files changed

+245
-610
lines changed

β€Ž.github/workflows/checks.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,14 @@ jobs:
88
name: Swiftlint
99
runs-on: ubuntu-latest
1010
steps:
11-
- uses: actions/checkout@v2
11+
- uses: actions/checkout@v3.5.0
1212
- name: GitHub Action for SwiftLint
1313
uses: norio-nomura/[email protected]
1414
changelog:
1515
name: Changelog
1616
runs-on: ubuntu-latest
1717
steps:
18-
- uses: actions/checkout@v2
18+
- uses: actions/checkout@v3.5.0
1919
- name: Changelog Reminder
2020
uses: peterjgrainger/[email protected]
2121
with:
@@ -26,6 +26,6 @@ jobs:
2626
name: Podspec
2727
runs-on: macos-latest
2828
steps:
29-
- uses: actions/checkout@v2
29+
- uses: actions/checkout@v3.5.0
3030
- name: Lint podspec
3131
run: pod lib lint

β€Ž.github/workflows/deploy.yml

+26-30
Original file line numberDiff line numberDiff line change
@@ -6,40 +6,36 @@ on:
66
- '*'
77

88
jobs:
9-
# Just comment out for now, uncomment when Carthage supports archives with XCFrameworks
10-
# carthage:
11-
# name: Upload Carthage binary
12-
# runs-on: macos-latest
13-
# steps:
14-
# - uses: actions/checkout@v2
15-
# - uses: AckeeCZ/[email protected]
16-
# - uses: actions/cache@v1
17-
# with:
18-
# path: Carthage
19-
# key: ${{ runner.os }}-carthage-${{ hashFiles('**/Cartfile.resolved') }}
20-
# restore-keys: |
21-
# ${{ runner.os }}-carthage-
22-
# - name: Build
23-
# run: carthage build --no-skip-current --cache-builds
24-
# - name: Archive
25-
# run: carthage archive Reqres
26-
# - uses: xresloader/upload-to-github-release@v1
27-
# if: startsWith(github.ref, 'refs/tags/')
28-
# env:
29-
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
30-
# with:
31-
# file: Reqres.framework.zip
32-
# tags: true
33-
# draft: false
9+
carthage:
10+
name: Upload Carthage binary
11+
runs-on: macos-latest
12+
steps:
13+
- uses: actions/[email protected]
14+
- uses: AckeeCZ/[email protected]
15+
- name: Build
16+
run: carthage build --no-skip-current --cache-builds --use-xcframeworks
17+
- name: Archive
18+
run: |
19+
DST=$PWD
20+
mkdir -p /tmp/Reqres
21+
mv Carthage/Build/*.xcframework /tmp/Reqres
22+
cd /tmp
23+
zip -r "$DST/"Reqres.xcframework.zip Reqres
24+
- uses: xresloader/upload-to-github-release@v1
25+
if: startsWith(github.ref, 'refs/tags/')
26+
env:
27+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
28+
with:
29+
file: Reqres.xcframework.zip
30+
tags: true
31+
draft: false
3432
cocoapods:
3533
name: Push podspec to Cocoapods trunk
3634
runs-on: macos-latest
3735
steps:
38-
- uses: actions/checkout@v2
39-
- uses: AckeeCZ/[email protected]
40-
- name: Install gems
41-
run: bundle install
36+
- uses: actions/[email protected]
37+
- uses: AckeeCZ/[email protected]
4238
- name: Push podspec
43-
run: bundle exec pod trunk push --allow-warnings
39+
run: pod trunk push --allow-warnings
4440
env:
4541
COCOAPODS_TRUNK_TOKEN: ${{ secrets.COCOAPODS_TRUNK_TOKEN }}

β€Ž.github/workflows/docs.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
runs-on: ubuntu-latest
1111

1212
steps:
13-
- uses: actions/checkout@v2
13+
- uses: actions/checkout@v3.5.0
1414
- name: Generate Documentation
1515
uses: SwiftDocOrg/swift-doc@master
1616
with:

β€Ž.github/workflows/tests.yml

+3-13
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,7 @@ jobs:
77
name: Run tests
88
runs-on: macos-latest
99
steps:
10-
- uses: actions/checkout@v2
11-
- uses: AckeeCZ/[email protected]
12-
- uses: actions/cache@v1
13-
with:
14-
path: Carthage
15-
key: ${{ runner.os }}-carthage-${{ hashFiles('**/Cartfile.resolved') }}
16-
restore-keys: |
17-
${{ runner.os }}-carthage-
18-
- name: Install Carthage dependencies
19-
env:
20-
GITHUB_ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
21-
run: carthage bootstrap --platform iOS --cache-builds --use-xcframeworks
10+
- uses: actions/[email protected]
11+
- uses: AckeeCZ/[email protected]
2212
- name: Run tests
23-
run: set -o pipefail && xcodebuild test -scheme Reqres -sdk iphonesimulator -destination 'platform=iOS Simulator,name=iPhone 11 Pro Max,OS=latest' ONLY_ACTIVE_ARCH=YES | xcpretty
13+
run: swift test

β€Ž.github/xcode-version

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
12.4
1+
14.2

β€Ž.swiftlint.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
whitelist_rules:
1+
only_rules:
22
- class_delegate_protocol
33
- closing_brace
44
- colon
@@ -16,7 +16,7 @@ whitelist_rules:
1616
- weak_delegate
1717
- overridden_super_call
1818
included: # paths to include during linting. `--path` is ignored if present.
19-
- Reqres
19+
- Sources
2020
excluded: # paths to ignore during linting. Takes precedence over `included`.
2121
- Carthage
2222
- Pods

β€ŽCHANGELOG.md

+4-1
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,16 @@
77
- <description> (#<PR_number>, kudos to @<author>)
88
```
99

10-
## master
10+
## main
1111

1212
### Added
1313
<!--- - <description> (#<PR_number, kudos to @<author>) --->
1414
- Run SwiftLint on build if installed locally ([#29](https://github.com/AckeeCZ/Reqres/pull/29), kudos to @olejnjak)
1515

1616
### Changed
17+
- Update structure ([#35](https://github.com/AckeeCZ/Reqres/pull/35), kudos to @olejnjak)
18+
- use Xcode 14.3
19+
- bump deployment target to iOS 11
1720
- Use Xcode 12.4 on CI ([#31](https://github.com/AckeeCZ/Reqres/pull/31), kudos to @olejnjak)
1821

1922
## 3.1.1

β€ŽCartfile.private

-1
This file was deleted.

β€ŽCartfile.resolved

-1
This file was deleted.

β€ŽPackage.swift

+6-5
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,17 @@ import PackageDescription
44
let package = Package(
55
name: "Reqres",
66
platforms: [
7-
.iOS(.v9),
7+
.iOS(.v11),
88
.macOS(.v10_12)
99
],
1010
products: [
1111
.library(name: "Reqres", targets: ["Reqres"]),
1212
],
1313
targets: [
14-
.target(name: "Reqres", path: "Reqres")
15-
],
16-
swiftLanguageVersions: [
17-
.v5
14+
.target(name: "Reqres"),
15+
.testTarget(
16+
name: "ReqresTests",
17+
dependencies: ["Reqres"]
18+
)
1819
]
1920
)

β€ŽReqres.podspec

+3-3
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Logs every request app makes, works great with Alamofire.
99
s.license = { :type => 'MIT', :file => 'LICENSE' }
1010
s.author = { 'Ackee' => '[email protected]' }
1111
s.source = { :git => 'https://github.com/AckeeCZ/Reqres.git', :tag => s.version.to_s }
12-
s.ios.deployment_target = '8.0'
13-
s.swift_version = '5.1'
14-
s.source_files = 'Reqres/*.swift'
12+
s.ios.deployment_target = '11.0'
13+
s.swift_version = '5.0'
14+
s.source_files = 'Sources/Reqres/*.swift'
1515
end

0 commit comments

Comments
Β (0)