Skip to content

Commit 08a8a9b

Browse files
committed
fix(workflow): update codesigning steps for apple platforms
1 parent 984fc0f commit 08a8a9b

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

.github/workflows/main.yml

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,17 +116,29 @@ 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 xcframework
120-
if: matrix.name == 'apple-xcframework'
119+
- name: create keychain for codesign
120+
if: matrix.os == 'macos-15'
121121
run: |
122122
echo "${{ secrets.APPLE_CERTIFICATE }}" | base64 --decode > certificate.p12
123123
security create-keychain -p "${{ secrets.KEYCHAIN_PASSWORD }}" build.keychain
124124
security default-keychain -s build.keychain
125125
security unlock-keychain -p "${{ secrets.KEYCHAIN_PASSWORD }}" build.keychain
126126
security import certificate.p12 -k build.keychain -P "${{ secrets.CERTIFICATE_PASSWORD }}" -T /usr/bin/codesign
127127
security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k "${{ secrets.KEYCHAIN_PASSWORD }}" build.keychain
128+
129+
- name: codesign dylib
130+
if: matrix.os == 'macos-15' && matrix.name != 'apple-xcframework'
131+
run: codesign --sign "${{ secrets.APPLE_TEAM_ID }}" --timestamp --options runtime dist/cloudsync.dylib
132+
133+
- name: codesign xcframework
134+
if: matrix.name == 'apple-xcframework'
135+
run: |
128136
find dist/CloudSync.xcframework -name "*.framework" -exec echo "Signing: {}" \; -exec codesign --sign "${{ secrets.APPLE_TEAM_ID }}" --timestamp --options runtime {} \; # Sign each individual framework FIRST
129137
codesign --sign "${{ secrets.APPLE_TEAM_ID }}" --timestamp --options runtime dist/CloudSync.xcframework # Then sign the xcframework wrapper
138+
139+
- name: cleanup keychain for codesign
140+
if: matrix.os == 'macos-15'
141+
run: |
130142
rm certificate.p12
131143
security delete-keychain build.keychain
132144

0 commit comments

Comments
 (0)