From 3a94a8a8ba2eb223f92e780b96a62ffcc6a182cf Mon Sep 17 00:00:00 2001 From: agentbox Date: Sat, 1 Aug 2026 11:01:55 +0000 Subject: [PATCH] fix: use find+zip to properly exclude files from release zip Switched from 'zip -x' patterns (which don't handle .git/ correctly) to 'find | zip -@' with explicit path exclusions. Release zip now ~130 KB instead of ~4.5 MB. --- .gitea/workflows/ci.yml | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index a9acd10..a20f585 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -70,15 +70,20 @@ jobs: - name: Package web app if: startsWith(github.ref, 'refs/tags/v') run: | - zip -r meal-tracker.zip . \ - -x ".git/*" ".git/" \ - -x ".gitea/*" ".gitea/" \ - -x ".env" ".pytest_cache/*" \ - -x "__pycache__/*" "meals.db" \ - -x "android/.gradle/*" "android/.gradle-home/*" \ - -x "android/app/build/*" "android/local.properties" \ - -x "android/gradle/wrapper/gradle-wrapper.jar" \ - -x "android/gradlew.bat" + find . -type f \ + ! -path './.git/*' \ + ! -path './.gitea/*' \ + ! -name '.env' \ + ! -path './.pytest_cache/*' \ + ! -path './__pycache__/*' \ + ! -name 'meals.db' \ + ! -path './android/.gradle/*' \ + ! -path './android/.gradle-home/*' \ + ! -path './android/app/build/*' \ + ! -name 'android/local.properties' \ + ! -name 'android/gradle/wrapper/gradle-wrapper.jar' \ + ! -name 'android/gradlew.bat' \ + | zip -q meal-tracker.zip -@ - name: Publish release if: startsWith(github.ref, 'refs/tags/v')