From 94c9fd69c6ebf3c572fc944690655b00ee2d7e87 Mon Sep 17 00:00:00 2001 From: Musa Misto Date: Sun, 29 Mar 2026 15:53:28 +0300 Subject: [PATCH] feat: add authentication error handling in altool output for TestFlight uploads --- .github/workflows/generic-ios-testflight.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.github/workflows/generic-ios-testflight.yml b/.github/workflows/generic-ios-testflight.yml index db3bcfb..855ba83 100644 --- a/.github/workflows/generic-ios-testflight.yml +++ b/.github/workflows/generic-ios-testflight.yml @@ -874,6 +874,11 @@ jobs: exit ${ALTOOL_EXIT} fi + if grep -qiE "NOT_AUTHORIZED|failed to authenticate|Authentication credentials are missing or invalid|received status code 401|Unable to authenticate|auth issue" "${OUTPUT_FILE}"; then + echo "ERROR: App Store authentication error detected in altool output. Failing workflow by policy." + exit 1 + fi + if grep -qiE "Validation failed|STATE_ERROR\.VALIDATION_ERROR|Invalid Version|CFBundleShortVersionString" "${OUTPUT_FILE}"; then echo "ERROR: App Store validation error detected in altool output. Failing workflow by policy." exit 1 @@ -1056,6 +1061,11 @@ jobs: exit ${ALTOOL_EXIT} fi + if grep -qiE "NOT_AUTHORIZED|failed to authenticate|Authentication credentials are missing or invalid|received status code 401|Unable to authenticate|auth issue" "${OUTPUT_FILE}"; then + echo "ERROR: App Store authentication error detected in altool output. Failing workflow by policy." + exit 1 + fi + if grep -qiE "Validation failed|STATE_ERROR\.VALIDATION_ERROR|Invalid Version|CFBundleShortVersionString" "${OUTPUT_FILE}"; then echo "ERROR: App Store validation error detected in altool output. Failing workflow by policy." exit 1