@@ -93,33 +93,16 @@ jobs:
9393 codesign -vvv --force --deep --sign "$APPLE_CODE_SIGN_IDENTITY_APP" \
9494 --entitlements lsl.entitlements --options runtime \
9595 install/Frameworks/lsl.framework/Versions/A/lsl
96- codesign -vvv --force --deep --sign "$APPLE_CODE_SIGN_IDENTITY_APP" \
97- --entitlements lsl.entitlements --options runtime \
98- install/Frameworks/lsl.framework
99- echo "✅ Verifying binary signatures in install target..."
10096 codesign -vvv --verify --deep --strict install/Frameworks/lsl.framework/Versions/A/lsl
101- codesign -vvv --verify --deep --strict install/Frameworks/lsl.framework
10297 elif [[ "${{ matrix.config.name }}" == "iOS" ]]; then
10398 codesign -vvv --force --deep --sign "$APPLE_CODE_SIGN_IDENTITY_APP" \
10499 install/Frameworks/lsl.framework/lsl
105- codesign -vvv --force --deep --sign "$APPLE_CODE_SIGN_IDENTITY_APP" \
106- install/Frameworks/lsl.framework
107- echo "✅ Verifying binary signatures in install target..."
108100 codesign -vvv --verify --deep --strict install/Frameworks/lsl.framework/lsl
109- codesign -vvv --verify --deep --strict install/Frameworks/lsl.framework
110101 fi
111-
112- - name : Zip LSL Framework
113- run : |
114- cd install/Frameworks
115- zip -r lsl.framework.zip lsl.framework
116- cd ../..
117-
118- - name : Upload LSL Framework Zip
119- uses : actions/upload-artifact@v4
120- with :
121- name : build-${{ matrix.config.name }}
122- path : install/Frameworks/lsl.framework.zip
102+ codesign -vvv --force --deep --sign "$APPLE_CODE_SIGN_IDENTITY_APP" \
103+ --entitlements lsl.entitlements --options runtime \
104+ install/Frameworks/lsl.framework
105+ codesign -vvv --verify --deep --strict install/Frameworks/lsl.framework
123106
124107 # run internal tests
125108# - name: unit tests
@@ -130,15 +113,64 @@ jobs:
130113# install/bin/lsl_test_exported --order rand --wait-for-keypress never --durations yes
131114# timeout-minutes: 10
132115
116+ - name : Package and Notarize macOS Installer
117+ if : matrix.config.name == 'macOS-latest'
118+ env :
119+ APPLE_DEVELOPMENT_TEAM : ${{ secrets.PROD_MACOS_NOTARIZATION_TEAM_ID }}
120+ APPLE_NOTARIZE_USERNAME : ${{ secrets.PROD_MACOS_NOTARIZATION_APPLE_ID }}
121+ APPLE_NOTARIZE_PASSWORD : ${{ secrets.PROD_MACOS_NOTARIZATION_PWD }}
122+ run : |
123+ # Get the version number from the framework's Info.plist
124+ LSL_VERSION=$(/usr/libexec/PlistBuddy -c "Print CFBundleShortVersionString" install/Frameworks/lsl.framework/Versions/A/Resources/Info.plist)
125+ echo "LSL_VERSION=$LSL_VERSION" >> $GITHUB_ENV
126+ echo "Debug: LSL_VERSION=$LSL_VERSION"
127+
128+ mkdir -p package
129+ productbuild --sign "$APPLE_CODE_SIGN_IDENTITY_INST" \
130+ --component install/Frameworks/lsl.framework \
131+ /Library/Frameworks package/liblsl-${LSL_VERSION}-Darwin-universal.pkg
132+ # Notarize the package
133+ xcrun notarytool submit package/liblsl-${LSL_VERSION}-Darwin-universal.pkg \
134+ --apple-id "$APPLE_NOTARIZE_USERNAME" \
135+ --password "$APPLE_NOTARIZE_PASSWORD" \
136+ --team-id "$APPLE_DEVELOPMENT_TEAM" \
137+ --wait
138+ # Staple the notarization ticket to the package
139+ xcrun stapler staple package/liblsl-${LSL_VERSION}-Darwin-universal.pkg
140+
133141 - name : upload dump
134142 if : failure()
135143 uses : actions/upload-artifact@v4
136144 with :
137145 name : dumps-${{ matrix.config.name }}
138146 path : dumps
139147
140- package_and_deploy :
141- name : Package and Deploy
148+ - name : Zip LSL Framework
149+ run : |
150+ cd install/Frameworks
151+ zip -ry lsl.framework.zip lsl.framework
152+ cd ../..
153+
154+ - name : Upload macOS Package and Framework
155+ if : matrix.config.name == 'macOS-latest'
156+ uses : actions/upload-artifact@v4
157+ with :
158+ name : build-macOS-latest
159+ path : |
160+ package/*.pkg
161+ install/Frameworks/lsl.framework.zip
162+ # Note: the artifact will preserves the folder structure up to the common root, in this case all.
163+
164+ - name : Upload iOS Framework
165+ if : matrix.config.name == 'iOS'
166+ uses : actions/upload-artifact@v4
167+ with :
168+ name : build-iOS
169+ path : install/Frameworks/lsl.framework.zip
170+ # Note: the artifact drops the folder structure and only keeps the zip.
171+
172+ xcframework_and_deploy :
173+ name : XCFramework and Deploy
142174 needs : build
143175 runs-on : macOS-latest
144176 steps :
@@ -154,7 +186,7 @@ jobs:
154186
155187 - name : Unzip macOS Framework
156188 run : |
157- unzip build-macOS-latest/lsl.framework.zip -d build-macOS-latest/Frameworks
189+ unzip build-macOS-latest/install/Frameworks/ lsl.framework.zip -d build-macOS-latest/Frameworks
158190
159191 - name : Unzip iOS Framework
160192 run : |
@@ -163,45 +195,12 @@ jobs:
163195 - name : Install certificates and provisioning profiles
164196 uses : ./.github/actions/install-apple-certs
165197 with :
166- MACOS_CERTIFICATE_APP : ${{ secrets.PROD_MACOS_CERTIFICATE }}
167- MACOS_CERTIFICATE_INST : ${{ secrets.PROD_MACOS_CERTIFICATE_INST }}
168- MACOS_CERTIFICATE_PWD : ${{ secrets.PROD_MACOS_CERTIFICATE_PWD }}
169- MACOS_CI_KEYCHAIN_PWD : ${{ secrets.PROD_MACOS_CI_KEYCHAIN_PWD }}
198+ MACOS_CERTIFICATE_APP : ${{ secrets.PROD_MACOS_CERTIFICATE }}
199+ MACOS_CERTIFICATE_INST : ${{ secrets.PROD_MACOS_CERTIFICATE_INST }}
200+ MACOS_CERTIFICATE_PWD : ${{ secrets.PROD_MACOS_CERTIFICATE_PWD }}
201+ MACOS_CI_KEYCHAIN_PWD : ${{ secrets.PROD_MACOS_CI_KEYCHAIN_PWD }}
170202
171- - name : Package and Notarize macOS Installer
172- env :
173- APPLE_DEVELOPMENT_TEAM : ${{ secrets.PROD_MACOS_NOTARIZATION_TEAM_ID }}
174- APPLE_NOTARIZE_USERNAME : ${{ secrets.PROD_MACOS_NOTARIZATION_APPLE_ID }}
175- APPLE_NOTARIZE_PASSWORD : ${{ secrets.PROD_MACOS_NOTARIZATION_PWD }}
176- run : |
177- set -x
178- # Get the version number from the framework's Info.plist
179- VERSION=$(/usr/libexec/PlistBuddy -c "Print CFBundleShortVersionString" build-macOS-latest/Frameworks/lsl.framework/Versions/A/Resources/Info.plist)
180- echo "LSL_VERSION=$VERSION" >> $GITHUB_ENV
181-
182- mkdir -p package
183- productbuild --sign "$APPLE_CODE_SIGN_IDENTITY_INST" \
184- --component build-macOS-latest/Frameworks/lsl.framework \
185- /Library/Frameworks package/liblsl-$LSL_VERSION-Darwin-universal.pkg
186- # Notarize the package
187- xcrun notarytool submit package/liblsl-$LSL_VERSION-Darwin-universal.pkg \
188- --apple-id "$APPLE_NOTARIZE_USERNAME" \
189- --password "$APPLE_NOTARIZE_PASSWORD" \
190- --team-id "$APPLE_DEVELOPMENT_TEAM" \
191- --wait --verbose
192- # Staple the notarization ticket to the package
193- xcrun stapler staple package/liblsl-$LSL_VERSION-Darwin-universal.pkg
194-
195- # If notarization fails, you can get the history of notarization requests:
196- # xcrun notarytool history --apple-id "$APPLE_NOTARIZE_USERNAME" --password "$APPLE_NOTARIZE_PASSWORD" --team-id "$APPLE_DEVELOPMENT_TEAM"
197- # Then you can check the status of a specific request:
198- # xcrun notarytool log <request-id> --apple-id "$APPLE_NOTARIZE_USERNAME" --password "$APPLE_NOTARIZE_PASSWORD" --team-id "$APPLE_DEVELOPMENT_TEAM"
199-
200- - name : Create, Sign, and Notarize XCFramework
201- env :
202- APPLE_DEVELOPMENT_TEAM : ${{ secrets.PROD_MACOS_NOTARIZATION_TEAM_ID }}
203- APPLE_NOTARIZE_USERNAME : ${{ secrets.PROD_MACOS_NOTARIZATION_APPLE_ID }}
204- APPLE_NOTARIZE_PASSWORD : ${{ secrets.PROD_MACOS_NOTARIZATION_PWD }}
203+ - name : Create and Sign XCFramework
205204 run : |
206205 xcodebuild -create-xcframework \
207206 -framework build-macOS-latest/Frameworks/lsl.framework \
0 commit comments