WIP: feat(workflows): add new build workflows for Windows, Linux, and macOS, and remove obsolete build scripts #17

Draft
m wants to merge 109 commits from ozgur/build into main
3 changed files with 46 additions and 14 deletions
Showing only changes of commit db463a2ece - Show all commits

View File

@ -244,17 +244,33 @@ runs:
ditto -c -k --keepParent "${{ inputs.app-path }}" "$ZIP_PATH"
echo "Submitting for notarization with API key..."
xcrun notarytool submit "$ZIP_PATH" \
# Capture output and exit status of notarization
NOTARY_OUTPUT=$(xcrun notarytool submit "$ZIP_PATH" \
--key ~/private_keys/AuthKey_${API_KEY_ID}.p8 \
--key-id "$API_KEY_ID" \
--issuer "$API_ISSUER_ID" \
--wait
--wait 2>&1)
NOTARY_STATUS=$?
# Display output for debugging
echo "Notarization command output:"
echo "$NOTARY_OUTPUT"
echo "Notarization exit status: $NOTARY_STATUS"
# Enhanced check for notarization success
if [ $NOTARY_STATUS -eq 0 ] && echo "$NOTARY_OUTPUT" | grep -q -E "success|accepted"; then
echo "✅ Notarization completed successfully!"
# Check if notarization succeeded
if [ $? -eq 0 ]; then
# Staple the notarization ticket
echo "Stapling notarization ticket..."
xcrun stapler staple "${{ inputs.app-path }}"
STAPLE_STATUS=$?
if [ $STAPLE_STATUS -eq 0 ]; then
echo "✅ Stapling completed successfully!"
else
echo "⚠️ Stapling completed with status $STAPLE_STATUS (may still be valid)"
fi
# Verify notarization
echo "🔍 Verifying notarization..."
@ -262,7 +278,8 @@ runs:
echo "::set-output name=notarized::true"
else
echo "❌ Notarization failed"
echo "❌ Notarization failed or did not complete properly"
echo "Please check the notarization logs for details"
fi
# Clean up
@ -277,17 +294,33 @@ runs:
ditto -c -k --keepParent "${{ inputs.app-path }}" "$ZIP_PATH"
echo "Submitting for notarization..."
xcrun notarytool submit "$ZIP_PATH" \
# Capture output and exit status of notarization
NOTARY_OUTPUT=$(xcrun notarytool submit "$ZIP_PATH" \
--apple-id "$APPLE_ID" \
--password "$APP_PASSWORD" \
--team-id "$APPLE_TEAM_ID" \
--wait
--wait 2>&1)
NOTARY_STATUS=$?
# Check if notarization succeeded
if [ $? -eq 0 ]; then
# Display output for debugging
echo "Notarization command output:"
echo "$NOTARY_OUTPUT"
echo "Notarization exit status: $NOTARY_STATUS"
# Enhanced check for notarization success
if [ $NOTARY_STATUS -eq 0 ] && echo "$NOTARY_OUTPUT" | grep -q -E "success|accepted"; then
echo "✅ Notarization completed successfully!"
# Staple the notarization ticket
echo "Stapling notarization ticket..."
xcrun stapler staple "${{ inputs.app-path }}"
STAPLE_STATUS=$?
if [ $STAPLE_STATUS -eq 0 ]; then
echo "✅ Stapling completed successfully!"
else
echo "⚠️ Stapling completed with status $STAPLE_STATUS (may still be valid)"
fi
# Verify notarization
echo "🔍 Verifying notarization..."
@ -295,7 +328,8 @@ runs:
echo "::set-output name=notarized::true"
else
echo "❌ Notarization failed"
echo "❌ Notarization failed or did not complete properly"
echo "Please check the notarization logs for details"
fi
else
echo "⚠️ Missing notarization credentials. Skipping notarization."

View File

@ -111,7 +111,7 @@ jobs:
with:
name: LuckyWorld-macOS-Signed
path: ${{ steps.sign-and-notarize.outputs.package-path }}
retention-days: 7
retention-days: 30
# Report results
- name: Report Results

View File

@ -73,10 +73,8 @@ rm -rf DerivedDataCache Intermediate Binaries Saved
# -skipiostore \
# -skippak \ (disable -pak and -iostore)
# http://forums.unrealengine.com/t/code-signing-and-notarization-for-mac/146486
echo ""
echo "Build completed. Application path:"
echo "🦾 Build completed. Application path:"
APP_PATH=$(find "$ARCHIVE_DIR" -name "*.app" -type d | head -n 1)
echo "$APP_PATH"