Skip to content

Commit f6a22c5

Browse files
committed
GHA: Fix target directories for framework packager
1 parent aa8d831 commit f6a22c5

File tree

1 file changed

+30
-10
lines changed

1 file changed

+30
-10
lines changed

.github/workflows/apple.yml

Lines changed: 30 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -109,11 +109,17 @@ jobs:
109109
codesign -vvv --verify --deep --strict install/Frameworks/lsl.framework
110110
fi
111111
112-
- name: upload install dir
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
113119
uses: actions/upload-artifact@v4
114120
with:
115121
name: build-${{ matrix.config.name }}
116-
path: install
122+
path: install/Frameworks/lsl.framework.zip
117123

118124
# run internal tests
119125
- name: unit tests
@@ -146,6 +152,14 @@ jobs:
146152
name: build-iOS
147153
path: build-iOS
148154

155+
- name: Unzip macOS Framework
156+
run: |
157+
unzip build-macOS-latest/lsl.framework.zip -d build-macOS-latest/Frameworks
158+
159+
- name: Unzip iOS Framework
160+
run: |
161+
unzip build-iOS/lsl.framework.zip -d build-iOS/Frameworks
162+
149163
- name: Install certificates and provisioning profiles
150164
uses: ./.github/actions/install-apple-certs
151165
with:
@@ -160,22 +174,28 @@ jobs:
160174
APPLE_NOTARIZE_USERNAME: ${{ secrets.PROD_MACOS_NOTARIZATION_APPLE_ID }}
161175
APPLE_NOTARIZE_PASSWORD: ${{ secrets.PROD_MACOS_NOTARIZATION_PWD }}
162176
run: |
177+
set -x
163178
# Get the version number from the framework's Info.plist
164-
VERSION=$(plutil -extract CFBundleShortVersionString xml1 -o - build-macOS-latest/install/Frameworks/lsl.framework/Versions/A/Resources/Info.plist | sed -n 's/.*<string>\(.*\)<\/string>.*/\1/p')
179+
VERSION=$(/usr/libexec/PlistBuddy -c "Print CFBundleShortVersionString" build-macOS-latest/Frameworks/lsl.framework/Versions/A/Resources/Info.plist)
165180
echo "LSL_VERSION=$VERSION" >> $GITHUB_ENV
166181
167182
mkdir -p package
168183
productbuild --sign "$APPLE_CODE_SIGN_IDENTITY_INST" \
169-
--component build-macOS-latest/install/Frameworks/lsl.framework \
170-
/Library/Frameworks package/liblsl-${LSL_VERSION}-Darwin-universal.pkg
184+
--component build-macOS-latest/Frameworks/lsl.framework \
185+
/Library/Frameworks package/liblsl-${LSL_VERSION}-Darwin-universal.pkg
171186
# Notarize the package
172187
xcrun notarytool submit package/liblsl-${LSL_VERSION}-Darwin-universal.pkg \
173188
--apple-id "$APPLE_NOTARIZE_USERNAME" \
174189
--password "$APPLE_NOTARIZE_PASSWORD" \
175190
--team-id "$APPLE_DEVELOPMENT_TEAM" \
176-
--wait
191+
--wait --verbose
177192
# Staple the notarization ticket to the package
178193
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"
179199
180200
- name: Create, Sign, and Notarize XCFramework
181201
env:
@@ -184,22 +204,22 @@ jobs:
184204
APPLE_NOTARIZE_PASSWORD: ${{ secrets.PROD_MACOS_NOTARIZATION_PWD }}
185205
run: |
186206
xcodebuild -create-xcframework \
187-
-framework build-macOS-latest/install/Frameworks/lsl.framework \
188-
-framework build-iOS/install/Frameworks/lsl.framework \
207+
-framework build-macOS-latest/Frameworks/lsl.framework \
208+
-framework build-iOS/Frameworks/lsl.framework \
189209
-output lsl.xcframework
190210
191211
codesign -vvv --force --deep --sign "$APPLE_CODE_SIGN_IDENTITY_APP" lsl.xcframework
192212
echo "✅ Verifying binary signatures in XCFramework..."
193213
codesign -vvv --verify --deep --strict lsl.xcframework
194214
195-
ditto -c -k --sequesterRsrc --keepParent lsl.xcframework lsl.xcframework.zip
215+
ditto -c -k --sequesterRsrc --keepParent lsl.xcframework lsl.xcframework.${LSL_VERSION}.zip
196216
197217
- name: upload artifacts
198218
uses: actions/upload-artifact@v4
199219
with:
200220
name: mac-packages
201221
path: |
202-
lsl.xcframework.zip
222+
lsl.xcframework.*.zip
203223
package/
204224
205225
- name: upload to release page

0 commit comments

Comments
 (0)