diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml index 6b7c1dd..74c9bb7 100644 --- a/.gitea/workflows/release.yml +++ b/.gitea/workflows/release.yml @@ -70,10 +70,11 @@ jobs: ls -la ls -la app/build/outputs/apk/release/ 2>/dev/null || echo "No release dir" ls -la app/build/outputs/apk/debug/ 2>/dev/null || echo "No debug dir" - ./gradlew --stop || true - ./gradlew assembleDebug assembleRelease --no-daemon --stacktrace > /tmp/build.log 2>&1 - BUILD_STATUS=$? - tail -100 /tmp/build.log + ./gradlew --stop 2>/dev/null || true + ./gradlew assembleDebug assembleRelease --no-daemon --stacktrace --rerun-tasks 2>&1 | tee /tmp/build.log + BUILD_STATUS=${PIPESTATUS[0]} + echo "Gradle exit status: $BUILD_STATUS" + tail -60 /tmp/build.log if [ $BUILD_STATUS -ne 0 ]; then echo "Build failed with exit code $BUILD_STATUS" exit 1 @@ -125,10 +126,6 @@ jobs: echo "ERROR: APK not found: $APK_PATH" exit 1 fi - if [ ! -f "$APK_PATH" ]; then - echo "ERROR: APK not found: $APK" - exit 1 - fi ASSET_ID=$(python3 - "$API" "$RELEASE_ID" "$APK" "$GH_TOKEN" << 'PYEOF') import sys, json