Skip to content

Commit ae0b9ed

Browse files
committed
feat(xcframework): add signing and notarization step for CloudSync.xcframework
1 parent 654d8fb commit ae0b9ed

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

.github/workflows/main.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,22 @@ jobs:
116116
- name: build sqlite-sync
117117
run: ${{ matrix.name == 'linux-musl' && matrix.arch == 'arm64' && 'docker exec alpine' || '' }} make extension ${{ matrix.make && matrix.make || ''}}
118118

119+
- name: sign and notarize xcframework
120+
if: matrix.name == 'apple-xcframework'
121+
run: |
122+
echo "${{ secrets.APPLE_CERTIFICATE }}" | base64 --decode > certificate.p12
123+
security create-keychain -p "${{ secrets.KEYCHAIN_PASSWORD }}" build.keychain
124+
security default-keychain -s build.keychain
125+
security unlock-keychain -p "${{ secrets.KEYCHAIN_PASSWORD }}" build.keychain
126+
security import certificate.p12 -k build.keychain -P "${{ secrets.CERTIFICATE_PASSWORD }}" -T /usr/bin/codesign
127+
security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k "${{ secrets.KEYCHAIN_PASSWORD }}" build.keychain
128+
codesign --sign "${{ secrets.APPLE_TEAM_ID }}" --timestamp --options runtime dist/CloudSync.xcframework
129+
ditto -c -k --keepParent dist/CloudSync.xcframework dist/CloudSync.xcframework.zip
130+
xcrun notarytool submit dist/CloudSync.xcframework.zip --apple-id "${{ secrets.APPLE_ID }}" --password "${{ secrets.APPLE_PASSWORD }}" --team-id "${{ secrets.APPLE_TEAM_ID }}" --wait
131+
xcrun stapler staple dist/CloudSync.xcframework
132+
rm dist/CloudSync.xcframework.zip certificate.p12
133+
security delete-keychain build.keychain
134+
119135
- name: android setup test environment
120136
if: matrix.name == 'android' && matrix.arch != 'arm64-v8a'
121137
run: |

0 commit comments

Comments
 (0)