Update actions/checkout to v6 and improve framework selection logic
Use v6 of actions/checkout in CI and release workflows. Refactor Package.swift to automatically use the local XCFramework if present, falling back to the release asset otherwise.
Seto Elkahfi committed
May 14, 2026 at 12:43 UTC
bff5e62d36a4b0eda3ddf84f10f546018039b9e4
3 files changed
+36
-19
.github/workflows/ci.yml
+6
-6
@@ -19,7 +19,7 @@ jobs:
19
name: Validate manifest
20
runs-on: macos-26
21
steps:
22
- - uses: actions/checkout@v4
22
+ - uses: actions/checkout@v6
23
- name: Dump package
24
run: swift package dump-package
25
- name: Resolve dependencies
@@ -30,7 +30,7 @@ jobs:
30
needs: validate
31
runs-on: macos-26
32
steps:
33
- - uses: actions/checkout@v4
33
+ - uses: actions/checkout@v6
34
- run: swift build
35
36
build-ios:
@@ -38,7 +38,7 @@ jobs:
38
needs: validate
39
runs-on: macos-26
40
steps:
41
- - uses: actions/checkout@v4
41
+ - uses: actions/checkout@v6
42
- name: Build for iOS
43
run: >
44
xcodebuild build
@@ -52,7 +52,7 @@ jobs:
52
needs: validate
53
runs-on: macos-26
54
steps:
55
- - uses: actions/checkout@v4
55
+ - uses: actions/checkout@v6
56
- name: Build for tvOS
57
run: >
58
xcodebuild build
@@ -66,7 +66,7 @@ jobs:
66
needs: validate
67
runs-on: macos-26
68
steps:
69
- - uses: actions/checkout@v4
69
+ - uses: actions/checkout@v6
70
- name: Build for visionOS
71
run: >
72
xcodebuild build
@@ -80,7 +80,7 @@ jobs:
80
needs: validate
81
runs-on: macos-26
82
steps:
83
- - uses: actions/checkout@v4
83
+ - uses: actions/checkout@v6
84
- name: Build for watchOS
85
run: >
86
xcodebuild build
.github/workflows/release.yml
+2
-2
@@ -13,7 +13,7 @@ jobs:
13
name: Validate package
14
runs-on: macos-26
15
steps:
16
- - uses: actions/checkout@v4
16
+ - uses: actions/checkout@v6
17
18
- name: Resolve dependencies
19
run: swift package resolve
@@ -34,7 +34,7 @@ jobs:
34
needs: validate
35
runs-on: ubuntu-latest
36
steps:
37
- - uses: actions/checkout@v4
37
+ - uses: actions/checkout@v6
38
39
- name: Create GitHub Release
40
uses: softprops/action-gh-release@v2
Package.swift
+28
-11
@@ -1,25 +1,45 @@
1
// swift-tools-version:6.2
2
+import Foundation
3
import PackageDescription
4
5
// ─────────────────────────────────────────────────────────────────────────────
6
// Local development
7
//
7
-// When you are working on the Onde Rust crate locally, build a path-based
8
-// XCFramework into this repository before opening the example app:
8
+// When you are working on the Onde Rust crate locally, build an XCFramework
9
+// into this repository before opening the example app:
10
//
11
// make ios
12
// # or: make macos / make tvos / make visionos / make watchos
13
//
13
-// The generated framework lives at:
14
-// ./OndeFramework.xcframework
14
+// If `./OndeFramework.xcframework` exists, this manifest uses it automatically.
15
+// That keeps local SwiftPM and Xcode iterations fast.
16
//
17
// Distribution
18
//
18
-// CI updates the URL and checksum on every release.
19
-// Do not edit them by hand. `build-swift-xcframework.yml` rewrites them when
20
-// a new onde GitHub Release goes out.
19
+// When the local XCFramework is absent, SwiftPM falls back to the published
20
+// release asset attached to the matching `onde` GitHub release.
21
// ─────────────────────────────────────────────────────────────────────────────
22
23
+let localFrameworkPath = "./OndeFramework.xcframework"
24
+let releaseFrameworkURL =
25
+ "https://github.com/ondeinference/onde/releases/download/1.0.0/OndeFramework.xcframework.zip"
26
+let releaseFrameworkChecksum =
27
+ "e50d88a657abe8d5bcc6df9422fa1bae2b2e1855209bbc4f8746ceb97f1ffd3b"
28
+
29
+let ondeFrameworkTarget: Target
30
+if FileManager.default.fileExists(atPath: localFrameworkPath) {
31
+ ondeFrameworkTarget = .binaryTarget(
32
+ name: "OndeFramework",
33
+ path: localFrameworkPath
34
+ )
35
+} else {
36
+ ondeFrameworkTarget = .binaryTarget(
37
+ name: "OndeFramework",
38
+ url: releaseFrameworkURL,
39
+ checksum: releaseFrameworkChecksum
40
+ )
41
+}
42
+
43
let package = Package(
44
name: "Onde",
45
platforms: [
@@ -33,10 +53,7 @@ let package = Package(
53
.library(name: "Onde", targets: ["Onde"])
54
],
55
targets: [
36
- .binaryTarget(
37
- name: "OndeFramework",
38
- path: "./OndeFramework.xcframework"
39
- ),
56
+ ondeFrameworkTarget,
57
.target(
58
name: "Onde",
59
dependencies: [.target(name: "OndeFramework")],