SharezoneApp / sharezone-app

Sharezone is a collaborative school organization app for iOS, Android, macOS and web with +500,000 downloads. Built with Flutter & Firebase.
https://sharezone.net
European Union Public License 1.2
254 stars 46 forks source link

macOS deployment fails #1593

Closed nilsreichardt closed 1 month ago

nilsreichardt commented 1 month ago
Use login keychain /Users/runner/Library/Keychains/login.keychain-db as system default keychain
Set keychain /Users/runner/Library/Keychains/login.keychain-db to system default keychain
Unhandled exception:
ProcessRunnerException: Running "bash -c APP_NAME=$(find $(pwd) -name "*.app") && 
PACKAGE_NAME=$(basename "$APP_NAME" .app).pkg && 
xcrun productbuild --component "$APP_NAME" /Applications/ unsigned.pkg && 
INSTALLER_CERT_NAME=$(keychain list-certificates | jq -r '.[] | select(.common_name | contains("Mac Developer Installer")) | .common_name' | head -1) && 
xcrun productsign --sign "$INSTALLER_CERT_NAME" unsigned.pkg "$PACKAGE_NAME" && 
rm -f unsigned.pkg" in /Users/runner/work/sharezone-app/sharezone-app/app exited with code 1
productbuild: Adding component at /Users/runner/work/sharezone-app/sharezone-app/app/build/macos/Build/Products/Release-prod/Sharezone.app
productbuild: Wrote product to unsigned.pkg
productbuild: Supported OS versions: [Min: 10.15, Before: None]
List available code signing certificates in keychain /Users/runner/Library/codemagic-cli-tools/keychains/02-05-24_s_eb0gtk.keychain-db
productsign: error: Could not find appropriate signing identity for “”.
:
List available code signing certificates in keychain /Users/runner/Library/codemagic-cli-tools/keychains/02-05-24_s_eb0gtk.keychain-db
productsign: error: Could not find appropriate signing identity for “”.
nilsreichardt commented 1 month ago

I fixed the issue. It looks like that we need to create a new certificate. I executed the following command locally (on my machine):

export APP_STORE_CONNECT_ISSUER_ID=...
export APP_STORE_CONNECT_KEY_IDENTIFIER=...
export APP_STORE_CONNECT_PRIVATE_KEY=$(cat PATH_TO_p8_FILE)
export BUNDLE_ID=de.codingbrain.sharezone.app
export CERTIFICATE_PRIVATE_KEY=$(cat PATH_TO_cert_key)

app-store-connect certificates list \
  --type MAC_INSTALLER_DISTRIBUTION \
  --certificate-key=@file:/Users/nils/Downloads/cert_key \
  --save

I updated nothing in our GitHub Actions. You find the variables in our password manager.