Skip to content

Commit dc7bf7e

Browse files
nan-liclaude
andcommitted
temp: inline build_all_frameworks into Build Binaries step for branch validation
The release workflow runs build_all_frameworks.sh from the release branch (cut from base_branch), so the script-file fix only takes effect once merged to base. Inlining the build here lets the unsigned-archive fix run when the workflow is dispatched from this branch. Revert to ./build_all_frameworks.sh after merge. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent f0692d6 commit dc7bf7e

1 file changed

Lines changed: 45 additions & 2 deletions

File tree

.github/workflows/create-release-prs.yml

Lines changed: 45 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,8 +111,51 @@ jobs:
111111
- name: Build Binaries
112112
run: |
113113
cd iOS_SDK/OneSignalSDK
114-
chmod +x ./build_all_frameworks.sh
115-
./build_all_frameworks.sh
114+
set -e
115+
# TEMP: build_all_frameworks.sh is inlined here so the unsigned-archive
116+
# fix runs from THIS workflow branch. The release branch is cut from
117+
# base_branch and still carries the old script, so calling the script
118+
# file would ignore our fix. Revert to ./build_all_frameworks.sh once the
119+
# fix is merged to the base branch.
120+
WORKING_DIR=$(pwd)
121+
# CODE_SIGNING_ALLOWED=NO: archive unsigned (no dev cert / DEVELOPMENT_TEAM
122+
# needed). The XCFrameworks are signed afterward in the Code Sign step.
123+
CODE_SIGN_FLAGS="CODE_SIGN_IDENTITY= CODE_SIGNING_REQUIRED=NO CODE_SIGNING_ALLOWED=NO"
124+
125+
create_xcframework() {
126+
FRAMEWORK_FOLDER_NAME=$1
127+
FRAMEWORK_NAME=$2
128+
BUILD_SCHEME=$3
129+
FRAMEWORK_PATH="${WORKING_DIR}/${FRAMEWORK_FOLDER_NAME}/${FRAMEWORK_NAME}.xcframework"
130+
SIMULATOR_ARCHIVE_PATH="${WORKING_DIR}/${FRAMEWORK_FOLDER_NAME}/simulator.xcarchive"
131+
IOS_DEVICE_ARCHIVE_PATH="${WORKING_DIR}/${FRAMEWORK_FOLDER_NAME}/iOS.xcarchive"
132+
CATALYST_ARCHIVE_PATH="${WORKING_DIR}/${FRAMEWORK_FOLDER_NAME}/catalyst.xcarchive"
133+
134+
rm -rf "${WORKING_DIR}/${FRAMEWORK_FOLDER_NAME}"
135+
mkdir "${FRAMEWORK_FOLDER_NAME}"
136+
echo "Archiving ${FRAMEWORK_NAME}"
137+
138+
xcodebuild archive ONLY_ACTIVE_ARCH=NO -scheme ${BUILD_SCHEME} -destination="generic/platform=iOS Simulator" -archivePath "${SIMULATOR_ARCHIVE_PATH}" -sdk iphonesimulator SKIP_INSTALL=NO BUILD_LIBRARIES_FOR_DISTRIBUTION=YES ${CODE_SIGN_FLAGS}
139+
xcodebuild archive -scheme ${BUILD_SCHEME} -destination="generic/platform=iOS" -archivePath "${IOS_DEVICE_ARCHIVE_PATH}" -sdk iphoneos SKIP_INSTALL=NO BUILD_LIBRARIES_FOR_DISTRIBUTION=YES ${CODE_SIGN_FLAGS}
140+
xcodebuild archive -scheme ${BUILD_SCHEME} -destination='generic/platform=macOS,variant=Mac Catalyst' -archivePath "${CATALYST_ARCHIVE_PATH}" SKIP_INSTALL=NO BUILD_LIBRARIES_FOR_DISTRIBUTION=YES ${CODE_SIGN_FLAGS}
141+
142+
xcodebuild -create-xcframework -framework ${SIMULATOR_ARCHIVE_PATH}/Products/Library/Frameworks/${FRAMEWORK_NAME}.framework -debug-symbols ${SIMULATOR_ARCHIVE_PATH}/dSYMs/${FRAMEWORK_NAME}.framework.dSYM -framework ${IOS_DEVICE_ARCHIVE_PATH}/Products/Library/Frameworks/${FRAMEWORK_NAME}.framework -debug-symbols ${IOS_DEVICE_ARCHIVE_PATH}/dSYMs/${FRAMEWORK_NAME}.framework.dSYM -framework ${CATALYST_ARCHIVE_PATH}/Products/Library/Frameworks/${FRAMEWORK_NAME}.framework -debug-symbols ${CATALYST_ARCHIVE_PATH}/dSYMs/${FRAMEWORK_NAME}.framework.dSYM -output "${FRAMEWORK_PATH}"
143+
144+
rm -rf "${SIMULATOR_ARCHIVE_PATH}"
145+
rm -rf "${IOS_DEVICE_ARCHIVE_PATH}"
146+
rm -rf "${CATALYST_ARCHIVE_PATH}"
147+
}
148+
149+
create_xcframework "OneSignal_Core" "OneSignalCore" "OneSignalCore"
150+
create_xcframework "OneSignal_OSCore" "OneSignalOSCore" "OneSignalOSCore"
151+
create_xcframework "OneSignal_Outcomes" "OneSignalOutcomes" "OneSignalOutcomes"
152+
create_xcframework "OneSignal_Extension" "OneSignalExtension" "OneSignalExtension"
153+
create_xcframework "OneSignal_Notifications" "OneSignalNotifications" "OneSignalNotifications"
154+
create_xcframework "OneSignal_User" "OneSignalUser" "OneSignalUser"
155+
create_xcframework "OneSignal_LiveActivities" "OneSignalLiveActivities" "OneSignalLiveActivities"
156+
create_xcframework "OneSignal_Location" "OneSignalLocation" "OneSignalLocation"
157+
create_xcframework "OneSignal_InAppMessages" "OneSignalInAppMessages" "OneSignalInAppMessages"
158+
create_xcframework "OneSignal_XCFramework" "OneSignalFramework" "OneSignalFramework"
116159
shell: bash
117160

118161
- name: Code Sign

0 commit comments

Comments
 (0)