From 76daf7b6b7c4b916e7a3a7bf86308b811d3f9db8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wojtek=20Kalici=C5=84ski?= <146713236+wkal-pubnub@users.noreply.github.com> Date: Mon, 16 Dec 2024 12:47:38 +0100 Subject: [PATCH] [CI] Change xcframework bundling scripts (#147) --- .github/workflows/release/kotlin-maven-build.sh | 6 ++++-- .github/workflows/release/kotlin-pre-publish.sh | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/.github/workflows/release/kotlin-maven-build.sh b/.github/workflows/release/kotlin-maven-build.sh index 11d4f766..8b5a41c7 100755 --- a/.github/workflows/release/kotlin-maven-build.sh +++ b/.github/workflows/release/kotlin-maven-build.sh @@ -3,8 +3,10 @@ echo "Build Kotlin and Swift Chat SDK module artifacts" ./gradlew -PENABLE_TARGET_IOS_ALL=true :podPublishReleaseXCFramework assemble find build/cocoapods/publish/release/PubNubChat.xcframework -exec touch -t 00000000 {} + rm -f build/cocoapods/publish/release/PubNubChat.xcframework.zip -zip -X -vr build/cocoapods/publish/release/PubNubChat.xcframework.zip build/cocoapods/publish/release/PubNubChat.xcframework -touch -t 00000000 build/cocoapods/publish/release/PubNubChat.xcframework.zip +pushd build/cocoapods/publish/release +zip -X -vr PubNubChat.xcframework.zip PubNubChat.xcframework +touch -t 00000000 PubNubChat.xcframework.zip +popd CHECKSUM=$(swift package compute-checksum build/cocoapods/publish/release/PubNubChat.xcframework.zip) echo $CHECKSUM mkdir build/gh_artifacts diff --git a/.github/workflows/release/kotlin-pre-publish.sh b/.github/workflows/release/kotlin-pre-publish.sh index d8cfc996..eaa755e8 100755 --- a/.github/workflows/release/kotlin-pre-publish.sh +++ b/.github/workflows/release/kotlin-pre-publish.sh @@ -3,8 +3,10 @@ echo "Update Swift Chat SDK checksum in Package.swift" ./gradlew -PENABLE_TARGET_IOS_ALL=true :podPublishReleaseXCFramework find build/cocoapods/publish/release/PubNubChat.xcframework -exec touch -t 00000000 {} + rm -f build/cocoapods/publish/release/PubNubChat.xcframework.zip -zip -X -vr build/cocoapods/publish/release/PubNubChat.xcframework.zip build/cocoapods/publish/release/PubNubChat.xcframework -touch -t 00000000 build/cocoapods/publish/release/PubNubChat.xcframework.zip +pushd build/cocoapods/publish/release +zip -X -vr PubNubChat.xcframework.zip PubNubChat.xcframework +touch -t 00000000 PubNubChat.xcframework.zip +popd CHECKSUM=$(swift package compute-checksum build/cocoapods/publish/release/PubNubChat.xcframework.zip) echo $CHECKSUM sed -i.bak "s/checksum: \"[a-z0-9]*\"/checksum: \"$CHECKSUM\"/g" Package.swift