File tree 5 files changed +50
-4
lines changed
5 files changed +50
-4
lines changed Original file line number Diff line number Diff line change 28
28
29
29
- name : Build iOS & macOS xcframework
30
30
run : |
31
- ./build-pod .sh
31
+ ./tool/build_xcframework .sh
32
32
33
33
- name : Lint pod
34
34
run : |
Original file line number Diff line number Diff line change 73
73
GPG_PRIVATE_KEY : ${{ secrets.GPG_PRIVATE_KEY }}
74
74
GPG_PASSWORD : ${{ secrets.GPG_PASSWORD }}
75
75
76
- publish_ios_pod :
76
+ publish_ios_pod_and_spm_package :
77
77
name : Publish iOS
78
78
needs : [draft_release]
79
79
runs-on : macos-latest
@@ -100,7 +100,7 @@ jobs:
100
100
101
101
- name : Build iOS & macOS xcframework
102
102
run : |
103
- ./build-pod .sh
103
+ .tool/build_xcframework .sh
104
104
105
105
- name : Lint pod
106
106
run : |
@@ -112,6 +112,26 @@ jobs:
112
112
GH_REPO : ${{ github.repository }}
113
113
run : |
114
114
gh release upload "${{ needs.draft_release.outputs.tag }}" powersync-sqlite-core.xcframework.tar.xz
115
+ gh release upload "${{ needs.draft_release.outputs.tag }}" powersync-sqlite-core.xcframework.tar.gz
116
+
117
+ # For SPM package
118
+ - name : Compute checksum and update Package.swift
119
+ run : |
120
+ CHECKSUM=$(swift package compute-checksum powersync-sqlite-core.xcframework.tar.gz)
121
+ sed -i '' \
122
+ -e "s|url: \".*\"|url: \"https://github.com/${{ github.repository }}/releases/download/${{ needs.draft_release.outputs.tag }}/powersync-sqlite-core.xcframework.tar.gz\"|" \
123
+ -e "s|checksum: \".*\"|checksum: \"$CHECKSUM\"|" \
124
+ Package.swift
125
+
126
+ - name : Commit and push updated Package.swift
127
+ run : |
128
+ git config user.name github-actions
129
+ git config user.email [email protected]
130
+ git add Package.swift
131
+ git commit -m "Update Package.swift for version ${{ needs.draft_release.outputs.tag }}"
132
+ git push
133
+
134
+
115
135
116
136
publish_linux_x86_64 :
117
137
name : Publish Linux x86_64
Original file line number Diff line number Diff line change
1
+ // swift-tools-version:5.3
2
+ import PackageDescription
3
+ let packageName = " PowerSyncSQLiteCore "
4
+
5
+ let package = Package (
6
+ name: packageName,
7
+ platforms: [
8
+ . iOS( . v11) ,
9
+ . macOS( . v10_13)
10
+ ] ,
11
+ products: [
12
+ . library(
13
+ name: packageName,
14
+ targets: [ packageName]
15
+ ) ,
16
+ ] ,
17
+ targets: [
18
+ . binaryTarget(
19
+ name: packageName,
20
+ url: " https://github.com/powersync-ja/powersync-sqlite-core/releases/download/v0.3.0/powersync-sqlite-core.xcframework.tar.gz " ,
21
+ checksum: " 65e09557520aabadfd5897c59a7b5e542f85a6c161b546dcb58109f63e0478e7 "
22
+ )
23
+ ]
24
+ )
Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ Bump the version number in these places:
6
6
2 . powersync-sqlite-core.podspec.
7
7
3 . android/build.gradle.kts
8
8
4 . android/src/prefab/prefab.json
9
- 5 . build-pod .sh - CFBundleVersion and CFBundleShortVersionString.
9
+ 5 . tool/build_xcframework .sh - CFBundleVersion and CFBundleShortVersionString.
10
10
6 . ` cargo build ` to update Cargo.lock
11
11
12
12
Create a tag:
Original file line number Diff line number Diff line change 64
64
65
65
cp -Rf " ${BUILD_DIR} /powersync-sqlite-core.xcframework" " powersync-sqlite-core.xcframework"
66
66
tar -cJvf powersync-sqlite-core.xcframework.tar.xz powersync-sqlite-core.xcframework LICENSE README.md
67
+ # swift command used for checksum required for SPM package does not support xz so need to create a tar.gz
68
+ tar -cJvf powersync-sqlite-core.xcframework.tar.gz powersync-sqlite-core.xcframework LICENSE README.md
67
69
rm -rf ${BUILD_DIR}
68
70
}
69
71
You can’t perform that action at this time.
0 commit comments