Skip to content

Commit b9ed1a9

Browse files
Fix Tart release signing (#1286)
1 parent 057646c commit b9ed1a9

3 files changed

Lines changed: 26 additions & 3 deletions

File tree

‎.ci/sign-release.sh‎

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,15 @@
22

33
set -eu
44

5+
APP_PATH="dist/tart_darwin_all/tart.app"
6+
57
if [ "${TART_RELEASE_SNAPSHOT:-false}" = "true" ]; then
68
codesign \
79
--force \
810
--deep \
911
--sign - \
1012
--entitlements Resources/tart-dev.entitlements \
11-
dist/tart_darwin_all/tart.app
13+
"$APP_PATH"
1214
else
1315
codesign \
1416
--force \
@@ -18,7 +20,22 @@ else
1820
--options runtime \
1921
--keychain "$RUNNER_TEMP/build.keychain" \
2022
--entitlements Resources/tart-prod.entitlements \
21-
dist/tart_darwin_all/tart.app
23+
"$APP_PATH"
24+
fi
25+
26+
codesign --verify --strict --verbose=2 "$APP_PATH"
27+
"$APP_PATH/Contents/MacOS/tart" --version
2228

23-
codesign --verify --strict --verbose=2 dist/tart_darwin_all/tart.app
29+
if [ "${TART_RELEASE_SNAPSHOT:-false}" != "true" ]; then
30+
NOTARIZATION_ARCHIVE="$RUNNER_TEMP/tart-notarization.zip"
31+
32+
ditto -c -k --keepParent "$APP_PATH" "$NOTARIZATION_ARCHIVE"
33+
xcrun notarytool submit "$NOTARIZATION_ARCHIVE" \
34+
--keychain-profile "notarytool" \
35+
--keychain "$RUNNER_TEMP/build.keychain" \
36+
--wait \
37+
--timeout 20m
38+
xcrun stapler staple "$APP_PATH"
39+
xcrun stapler validate "$APP_PATH"
40+
spctl --assess --type execute --verbose=4 "$APP_PATH"
2441
fi

‎.github/workflows/release.yml‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ jobs:
2828
persist-credentials: false
2929
- name: Import signing certificate
3030
env:
31+
AC_PASSWORD: ${{ secrets.AC_PASSWORD }}
3132
KEYCHAIN_PASSWORD: temporary-password
3233
MACOS_CERTIFICATE: ${{ secrets.MACOS_CERTIFICATE }}
3334
P12_PASSWORD: password101
@@ -48,6 +49,11 @@ jobs:
4849
-k "$KEYCHAIN_PASSWORD" \
4950
"$RUNNER_TEMP/build.keychain"
5051
security list-keychain -d user -s "$RUNNER_TEMP/build.keychain"
52+
xcrun notarytool store-credentials "notarytool" \
53+
--apple-id "hello@cirruslabs.org" \
54+
--team-id "9M2P8L4D89" \
55+
--password "$AC_PASSWORD" \
56+
--keychain "$RUNNER_TEMP/build.keychain"
5157
- name: Create release app token for this repo
5258
id: app-token
5359
uses: actions/create-github-app-token@1b10c78c7865c340bc4f6099eb2f838309f1e8c3 # v3.1.1
135 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)