Skip to content

Commit 4493bb7

Browse files
authored
Merge pull request #18 from NakaokaRei/codex/add-release-notarization
Add release notarization
2 parents 2b200e7 + 12a4ccb commit 4493bb7

1 file changed

Lines changed: 21 additions & 0 deletions

File tree

.github/workflows/release.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,27 @@ jobs:
132132
-scheme TrackpadAir \
133133
-archivePath "$RUNNER_TEMP/TrackpadAir.xcarchive"
134134
135+
- name: Notarize app
136+
env:
137+
APP_STORE_CONNECT_API_ISSUER_ID: ${{ secrets.APP_STORE_CONNECT_API_ISSUER_ID }}
138+
APP_STORE_CONNECT_API_KEY: ${{ secrets.APP_STORE_CONNECT_API_KEY }}
139+
APP_STORE_CONNECT_API_KEY_ID: ${{ secrets.APP_STORE_CONNECT_API_KEY_ID }}
140+
run: |
141+
APP_PATH="$RUNNER_TEMP/TrackpadAir.xcarchive/Products/Applications/TrackpadAir.app"
142+
NOTARIZATION_ZIP="$RUNNER_TEMP/TrackpadAir-notarization.zip"
143+
API_KEY_PATH="$RUNNER_TEMP/AuthKey_$APP_STORE_CONNECT_API_KEY_ID.p8"
144+
145+
printf '%s' "$APP_STORE_CONNECT_API_KEY" > "$API_KEY_PATH"
146+
ditto -c -k --keepParent "$APP_PATH" "$NOTARIZATION_ZIP"
147+
xcrun notarytool submit "$NOTARIZATION_ZIP" \
148+
--key "$API_KEY_PATH" \
149+
--key-id "$APP_STORE_CONNECT_API_KEY_ID" \
150+
--issuer "$APP_STORE_CONNECT_API_ISSUER_ID" \
151+
--wait
152+
xcrun stapler staple "$APP_PATH"
153+
xcrun stapler validate "$APP_PATH"
154+
spctl --assess --type execute --verbose=4 "$APP_PATH"
155+
135156
- name: Package app
136157
run: |
137158
ditto -c -k --keepParent \

0 commit comments

Comments
 (0)