release: sign 1.1.3 without notarization

This commit is contained in:
2026-07-15 20:10:48 +02:00
parent e3397e5e85
commit 47ca61a811
10 changed files with 43 additions and 57 deletions
+19 -23
View File
@@ -8,16 +8,14 @@ SCHEME="meetingnotes"
RUNNER_TEMP="${RUNNER_TEMP:-/tmp}"
BUILD_ROOT="${BUILD_ROOT:-$RUNNER_TEMP/meetingnotes-release}"
DERIVED_DATA="$BUILD_ROOT/DerivedData"
PENDING_DIR="$BUILD_ROOT/pending"
RELEASE_DIR="$BUILD_ROOT/release"
APP_PATH="$DERIVED_DATA/Build/Products/Release/$APP_NAME.app"
required_variables=(
VERSION
SIGNING_IDENTITY
APPLE_ID
APPLE_TEAM_ID
APPLE_APP_PASSWORD
GITHUB_SHA
SPARKLE_PRIVATE_KEY
GITHUB_REPOSITORY
)
for variable in "${required_variables[@]}"; do
@@ -34,7 +32,7 @@ if [[ "$project_version" != "$VERSION" ]]; then
fi
rm -rf "$BUILD_ROOT"
mkdir -p "$PENDING_DIR"
mkdir -p "$RELEASE_DIR"
xcodebuild \
-project "$PROJECT" \
@@ -78,31 +76,29 @@ codesign --force --timestamp --options runtime \
codesign --verify --deep --strict --verbose=2 "$APP_PATH"
codesign -d --entitlements :- "$APP_PATH" 2>&1 | grep -q 'com.apple.security.app-sandbox'
PRE_NOTARY_ZIP="$PENDING_DIR/$APP_NAME-pre-notary.zip"
ditto -c -k --sequesterRsrc --keepParent "$APP_PATH" "$PRE_NOTARY_ZIP"
xcrun notarytool submit "$PRE_NOTARY_ZIP" \
--apple-id "$APPLE_ID" \
--team-id "$APPLE_TEAM_ID" \
--password "$APPLE_APP_PASSWORD" \
--output-format json > "$PENDING_DIR/notary-submission.json"
SUBMISSION_ID=$(plutil -extract id raw -o - "$PENDING_DIR/notary-submission.json")
echo "Notarization submitted: $SUBMISSION_ID"
ARCHIVE_NAME="$APP_NAME-$VERSION.zip"
ARCHIVE_PATH="$RELEASE_DIR/$ARCHIVE_NAME"
ditto -c -k --sequesterRsrc --keepParent "$APP_PATH" "$ARCHIVE_PATH"
GENERATE_APPCAST=$(find "$DERIVED_DATA/SourcePackages/artifacts" -type f -name generate_appcast -print -quit)
if [[ -z "$GENERATE_APPCAST" ]]; then
echo "Sparkle generate_appcast tool was not found" >&2
exit 1
fi
cp "$GENERATE_APPCAST" "$PENDING_DIR/generate_appcast"
printf '%s' "$VERSION" > "$PENDING_DIR/version"
printf '%s' "$GITHUB_SHA" > "$PENDING_DIR/commit-sha"
DOWNLOAD_URL="https://github.com/$GITHUB_REPOSITORY/releases/download/v$VERSION/"
printf '%s' "$SPARKLE_PRIVATE_KEY" | "$GENERATE_APPCAST" "$RELEASE_DIR" \
--ed-key-file - \
--download-url-prefix "$DOWNLOAD_URL" \
--maximum-deltas 0 \
-o "$RELEASE_DIR/appcast.xml"
grep -q "$DOWNLOAD_URL$ARCHIVE_NAME" "$RELEASE_DIR/appcast.xml"
grep -q 'sparkle:edSignature=' "$RELEASE_DIR/appcast.xml"
if [[ -n "${GITHUB_STEP_SUMMARY:-}" ]]; then
printf 'Submitted Meetingnotes %s for Apple notarization.\n\nSubmission: `%s`\n\nThe finalize workflow will publish the release after Apple accepts it.\n' \
"$VERSION" "$SUBMISSION_ID" >> "$GITHUB_STEP_SUMMARY"
printf 'Built and Developer ID-signed Meetingnotes %s. The GitHub release is ready to publish.\n' \
"$VERSION" >> "$GITHUB_STEP_SUMMARY"
fi
echo "Signed app and notarization metadata are ready in $PENDING_DIR"
echo "Signed release artifacts are ready in $RELEASE_DIR"