From 8851bf238ee446e87dfeb2704418fa973e7fa5cc Mon Sep 17 00:00:00 2001 From: Andrew Sazonov Date: Wed, 19 Jun 2024 12:50:16 +0200 Subject: [PATCH] more debug --- .github/workflows/installer.yml | 8 ++++++++ tools/Scripts/SignAppInstaller.py | 24 +++++++++++++++--------- 2 files changed, 23 insertions(+), 9 deletions(-) diff --git a/.github/workflows/installer.yml b/.github/workflows/installer.yml index 6d99006..0e73af6 100644 --- a/.github/workflows/installer.yml +++ b/.github/workflows/installer.yml @@ -23,6 +23,14 @@ jobs: - name: Check-out repository uses: actions/checkout@v4 + - name: Sign offline app installer (version 1) + if: github.event_name == 'push' + run: > + python tools/Scripts/SignAppInstaller.py + fix-signing-macos ${{ matrix.os }} + ${{ secrets.MACOS_CERTIFICATE_ENCODED }} ${{ secrets.MACOS_CERTIFICATE_PASSWORD }} + ${{ secrets.APPSTORE_NOTARIZATION_USERNAME }} ${{ secrets.APPSTORE_NOTARIZATION_PASSWORD }} + - name: Set up Python environment uses: actions/setup-python@v5 with: diff --git a/tools/Scripts/SignAppInstaller.py b/tools/Scripts/SignAppInstaller.py index 140c0da..d038d37 100644 --- a/tools/Scripts/SignAppInstaller.py +++ b/tools/Scripts/SignAppInstaller.py @@ -15,16 +15,22 @@ CONFIG = Config.Config(sys.argv[1], sys.argv[2]) +MACOS_CERTIFICATE_ENCODED = sys.argv[3] # Encoded content of the .p12 certificate file (exported from certificate of Developer ID Application type) +MACOS_CERTIFICATE_PASSWORD = sys.argv[4] # Password associated with the .p12 certificate +APPSTORE_NOTARIZATION_USERNAME = sys.argv[5] # Apple ID (esss.se personal account) added to https://developer.apple.com +APPSTORE_NOTARIZATION_PASSWORD = sys.argv[6] # App specific password for EasyDiffraction from https://appleid.apple.com + IDENTITY = CONFIG['ci']['codesign']['apple']['identity'] BUNDLE_ID = CONFIG['ci']['codesign']['bundle_id'] TEAM_ID = CONFIG['ci']['codesign']['apple']['team_id'] -MACOS_CERTIFICATE_ENCODED = sys.argv[3] # Encoded content of the certificate.p12 file -MACOS_CERTIFICATE_PASSWORD = sys.argv[4] # Password associated with the certificate.p12 file -APPSTORE_NOTARIZATION_USERNAME = sys.argv[5] # Apple ID (esss.se personal account) added to https://developer.apple.com -APPSTORE_NOTARIZATION_PASSWORD = sys.argv[6] # App specific password for EasyDiffraction from https://appleid.apple.com + +print('IDENTITY', IDENTITY) +print('BUNDLE_ID', BUNDLE_ID) +print('TEAM_ID', TEAM_ID) +exit() def signLinux(): - Functions.printNeutralMessage('No code signing needed for linux') + Functions.printNeutralMessage('Code signing on Linux is not supported yet') return def signWindows(): @@ -143,8 +149,8 @@ def signMacos(): sub_message = f'display information about the code at "{CONFIG.setup_exe_path}" before signing' Functions.run( 'codesign', - '--display', # nested code content such as helpers, frameworks, and plug-ins, should be recursively signed - '--verbose', # replace any existing signature on the path(s) given + '--display', + '--verbose', CONFIG.setup_exe_path) except Exception as sub_exception: Functions.printFailMessage(sub_message, sub_exception) @@ -174,8 +180,8 @@ def signMacos(): sub_message = f'display information about the code at "{CONFIG.setup_exe_path}" after signing' Functions.run( 'codesign', - '--display', # nested code content such as helpers, frameworks, and plug-ins, should be recursively signed - '--verbose', # replace any existing signature on the path(s) given + '--display', + '--verbose', CONFIG.setup_exe_path) except Exception as sub_exception: Functions.printFailMessage(sub_message, sub_exception)