@@ -431,7 +431,7 @@ jobs:
431431 codesign --sign "${{ secrets.APPLE_TEAM_ID }}" --timestamp --options runtime dist/ai.xcframework # Then sign the xcframework wrapper
432432 ditto -c -k --keepParent dist/ai.xcframework dist/ai.xcframework.zip
433433 xcrun notarytool submit dist/ai.xcframework.zip --apple-id "${{ secrets.APPLE_ID }}" --password "${{ secrets.APPLE_PASSWORD }}" --team-id "${{ secrets.APPLE_TEAM_ID }}" --wait
434- rm dist/ai.xcframework.zip
434+ rm -rf dist/ai.xcframework
435435
436436 - name : cleanup keychain for codesign
437437 if : matrix.os == 'macos-15'
@@ -524,7 +524,11 @@ jobs:
524524 if [[ "$name" != "ai-apple-xcframework" && "$name" != "ai-android-aar" ]]; then
525525 tar -czf "${name}-${VERSION}.tar.gz" -C "$folder" .
526526 fi
527- if [[ "$name" != "ai-android-aar" ]]; then
527+ if [[ "$name" == "ai-apple-xcframework" ]]; then
528+ # Use the ditto-created zip that preserves macOS symlinks and extract for other steps
529+ cp "$folder/ai.xcframework.zip" "${name}-${VERSION}.zip"
530+ unzip -q "$folder/ai.xcframework.zip" -d "$folder/"
531+ elif [[ "$name" != "ai-android-aar" ]]; then
528532 (cd "$folder" && zip -rq "../../${name}-${VERSION}.zip" .)
529533 else
530534 cp "$folder"/*.aar "${name}-${VERSION}.aar"
@@ -618,6 +622,23 @@ jobs:
618622 echo " Platform packages: 7"
619623 echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
620624
625+ - name : update Package.swift checksum and version
626+ if : steps.tag.outputs.version != ''
627+ run : |
628+ VERSION=${{ steps.tag.outputs.version }}
629+ ZIP="ai-apple-xcframework-${VERSION}.zip"
630+ if [ -f "$ZIP" ]; then
631+ CHECKSUM=$(swift package compute-checksum "$ZIP")
632+ URL="https://github.com/sqliteai/sqlite-ai/releases/download/${VERSION}/${ZIP}"
633+ sed -i "s|url: \".*apple-xcframework.*\"|url: \"${URL}\"|" Package.swift
634+ sed -i "s|checksum: \".*\"|checksum: \"${CHECKSUM}\"|" Package.swift
635+ git config --global user.email "$GITHUB_ACTOR@users.noreply.github.com"
636+ git config --global user.name "$GITHUB_ACTOR"
637+ git add Package.swift
638+ git commit -m "Update Package.swift checksum for ${VERSION} [skip ci]" || true
639+ git push origin main || true
640+ fi
641+
621642 - uses : softprops/action-gh-release@v2.2.1
622643 if : steps.tag.outputs.version != ''
623644 with :
0 commit comments