Skip to content

Commit

Permalink
more debug
Browse files Browse the repository at this point in the history
  • Loading branch information
AndrewSazonov committed Jun 19, 2024
1 parent 2474733 commit 8851bf2
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 9 deletions.
8 changes: 8 additions & 0 deletions .github/workflows/installer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
24 changes: 15 additions & 9 deletions tools/Scripts/SignAppInstaller.py
Original file line number Diff line number Diff line change
Expand Up @@ -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():
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 8851bf2

Please sign in to comment.