You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Check if ENABLE_NUKE_CERTS is not set to true when certs are valid
77
+
if [ "$CERT_STATUS" != "true" ] && [ "$ENABLE_NUKE_CERTS" != "true" ]; then
78
+
echo "::notice::🔔 Automated renewal of certificates is disabled because the repository variable ENABLE_NUKE_CERTS is not set to 'true'."
79
+
fi
80
+
# Check if ENABLE_NUKE_CERTS is not set to true when certs are not valid
81
+
if [ "$CERT_STATUS" = "true" ] && [ "$ENABLE_NUKE_CERTS" != "true" ]; then
82
+
echo "::error::❌ No valid distribution certificate found. Automated renewal of certificates was skipped because the repository variable ENABLE_NUKE_CERTS is not set to 'true'."
83
+
exit 1
84
+
fi
85
+
# Check if vars.FORCE_NUKE_CERTS is not set to true
86
+
if [ vars.FORCE_NUKE_CERTS = "true" ]; then
87
+
echo "::warning::‼️ Nuking of certificates was forced because the repository variable FORCE_NUKE_CERTS is set to 'true'."
88
+
fi
89
+
# Nuke Certs if needed, and if the repository variable ENABLE_NUKE_CERTS is set to 'true', or if FORCE_NUKE_CERTS is set to 'true', which will always force certs to be nuked
set -e # Set error immediately after this step if error occurs
108
+
bundle exec fastlane nuke_certs
109
+
- name: Recreate Distribution certificate after nuking
110
+
run: |
111
+
set -e # Set error immediately after this step if error occurs
112
+
bundle exec fastlane certs
113
+
- name: Add success annotations for nuke and certificate recreation
114
+
if: ${{ success() }}
115
+
run: |
116
+
echo "::warning::⚠️ All Distribution certificates and TestFlight profiles have been revoked and recreated."
117
+
echo "::warning::❗️ If you have other apps being distributed by GitHub Actions / Fastlane / TestFlight that does not renew certificates automatically, please run the '3. Create Certificates' workflow for each of these apps to allow these apps to be built."
118
+
echo "::warning::✅ But don't worry about your existing TestFlight builds, they will keep working!"
Copy file name to clipboardExpand all lines: .github/workflows/validate_secrets.yml
+4-5Lines changed: 4 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -178,16 +178,15 @@ jobs:
178
178
elif ! echo "$FASTLANE_KEY" | openssl pkcs8 -nocrypt >/dev/null; then
179
179
failed=true
180
180
echo "::error::The FASTLANE_KEY secret is set but invalid. Verify that you copied it correctly from the API Key file (*.p8) you downloaded and try again."
181
-
elif ! bundle exec fastlane validate_secrets 2>&1 |tee fastlane.log; then
181
+
elif ! (bundle exec fastlane validate_secrets 2>&1 || true) | tee fastlane.log; then # ignore "fastlane validate_secrets" errors and continue on errors without annotating an exit code
182
182
if grep -q "bad decrypt" fastlane.log; then
183
183
failed=true
184
184
echo "::error::Unable to decrypt the Match-Secrets repository using the MATCH_PASSWORD secret. Verify that it is set correctly and try again."
echo "::error::Unable to create a valid authorization token for the App Store Connect API. Verify that the latest developer program license agreement has been accepted at https://developer.apple.com/account (review and accept any updated agreement), then wait a few minutes for changes to propagate and try again."
188
-
elif ! grep -q -e "No code signing identity found" -e "Could not install WWDR certificate" fastlane.log; then
189
-
failed=true
190
-
echo "::error::Unable to create a valid authorization token for the App Store Connect API. Verify that the FASTLANE_ISSUER_ID, FASTLANE_KEY_ID, and FASTLANE_KEY secrets are set correctly and try again."
187
+
echo "::error::❗️ Verify that the latest developer program license agreement has been accepted at https://developer.apple.com/account (review and accept any updated agreement), then wait a few minutes for changes to take effect and try again."
188
+
elif grep -q "Your certificate .* is not valid" fastlane.log; then
189
+
echo "::notice::Your Distribution certificate is invalid or expired. Automated renewal of the certificate will be attempted."
0 commit comments