diff --git a/.github/workflows/claude-nl-suite.yml b/.github/workflows/claude-nl-suite.yml index da67d85..e732cb8 100644 --- a/.github/workflows/claude-nl-suite.yml +++ b/.github/workflows/claude-nl-suite.yml @@ -97,16 +97,20 @@ jobs: printf "%s" "$UNITY_LICENSE" > "$f" fi chmod 600 "$f" || true - # If someone pasted an entitlement XML into UNITY_LICENSE by mistake, re-home it: - if head -c 100 "$f" | grep -qi '<\?xml'; then - mkdir -p "$RUNNER_TEMP/unity-config/Unity/licenses" - mv "$f" "$RUNNER_TEMP/unity-config/Unity/licenses/UnityEntitlementLicense.xml" - echo "ok=false" >> "$GITHUB_OUTPUT" - elif grep -qi '' "$f"; then + # Detect ULF first; it is XML and includes a element. + if grep -qi '' "$f"; then # provide it in the standard local-share path too cp -f "$f" "$RUNNER_TEMP/unity-local/Unity/Unity_lic.ulf" + echo "License source: ULF (Signature found)" echo "ok=true" >> "$GITHUB_OUTPUT" + # If someone pasted an entitlement XML into UNITY_LICENSE by mistake, re-home it: + elif grep -qi 'Entitlement|entitlement' "$f"; then + mkdir -p "$RUNNER_TEMP/unity-config/Unity/licenses" + mv "$f" "$RUNNER_TEMP/unity-config/Unity/licenses/UnityEntitlementLicense.xml" + echo "License source: Entitlement XML (re-homed)" + echo "ok=false" >> "$GITHUB_OUTPUT" else + echo "License source: Unknown format (no ULF Signature or Entitlement markers)" echo "ok=false" >> "$GITHUB_OUTPUT" fi