release: sign 1.1.3 without notarization
This commit is contained in:
@@ -7,7 +7,7 @@ set -e # Exit on any error
|
||||
|
||||
# Configuration
|
||||
APP_NAME="Meetingnotes"
|
||||
BUNDLE_ID="owen.meetingnotes"
|
||||
BUNDLE_ID="net.jamesbone.meetingnotes"
|
||||
VERSION=$(grep -m1 "MARKETING_VERSION" Meetingnotes.xcodeproj/project.pbxproj | sed 's/.*= \(.*\);/\1/')
|
||||
|
||||
# Source environment variables if .env file exists
|
||||
@@ -379,4 +379,4 @@ echo " 1. Test the DMG on another Mac"
|
||||
echo " 2. Create a GitHub release with tag v${VERSION}"
|
||||
echo " 3. Upload the DMG to the GitHub release"
|
||||
echo " 4. Commit and push the appcast.xml file"
|
||||
echo " 5. Your users will get auto-update notifications!"
|
||||
echo " 5. Your users will get auto-update notifications!"
|
||||
|
||||
+19
-23
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user