fix: use find+zip to properly exclude files from release zip
CI / build-android (push) Successful in 3m6s
CI / test (push) Successful in 36s

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.
This commit is contained in:
agentbox
2026-08-01 11:01:55 +00:00
parent 587c847b44
commit 3a94a8a8ba
+14 -9
View File
@@ -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')