1+ #! /bin/bash
2+
3+ # Simplified certificate export script
4+ echo " Simple Certificate Export for GitHub Actions"
5+ echo " ==========================================="
6+ echo " "
7+ echo " This script will export your Developer ID Application certificate."
8+ echo " "
9+
10+ # List certificates
11+ echo " Available Developer ID certificates:"
12+ echo " -----------------------------------"
13+ security find-identity -v -p codesigning | grep " Developer ID Application"
14+
15+ echo " "
16+ echo " Please follow these steps:"
17+ echo " "
18+ echo " 1. Open Keychain Access"
19+ echo " 2. Find your 'Developer ID Application' certificate"
20+ echo " 3. Right-click and select 'Export...'"
21+ echo " 4. Save as a .p12 file with a simple password (no special characters)"
22+ echo " 5. Note the exact password you used"
23+ echo " "
24+ read -p " Press Enter after you've exported the certificate..."
25+
26+ echo " "
27+ read -p " Enter the path to your exported .p12 file: " P12_PATH
28+
29+ if [ ! -f " $P12_PATH " ]; then
30+ echo " ❌ File not found: $P12_PATH "
31+ exit 1
32+ fi
33+
34+ echo " "
35+ echo " Converting to base64..."
36+ CERT_BASE64=$( base64 < " $P12_PATH " )
37+
38+ echo " "
39+ echo " Certificate prepared!"
40+ echo " "
41+ echo " Now update these GitHub secrets:"
42+ echo " ================================"
43+ echo " "
44+ echo " 1. Go to: https://github.com/vijaythecoder/clueless/settings/secrets/actions"
45+ echo " "
46+ echo " 2. Update NATIVEPHP_CERTIFICATE_BASE64 with the base64 string"
47+ echo " (It has been copied to your clipboard)"
48+ echo " "
49+ echo " 3. Update NATIVEPHP_CERTIFICATE_PASSWORD with your password"
50+ echo " ⚠️ Make sure to enter the exact password with no extra spaces"
51+ echo " "
52+
53+ if command -v pbcopy & > /dev/null; then
54+ echo " $CERT_BASE64 " | pbcopy
55+ echo " ✅ Base64 certificate copied to clipboard!"
56+ else
57+ echo " Base64 certificate:"
58+ echo " =================="
59+ echo " $CERT_BASE64 "
60+ echo " =================="
61+ fi
62+
63+ echo " "
64+ echo " After updating both secrets, push any change to trigger a new build."
0 commit comments