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 - name: Package web app
if: startsWith(github.ref, 'refs/tags/v') if: startsWith(github.ref, 'refs/tags/v')
run: | run: |
zip -r meal-tracker.zip . \ find . -type f \
-x ".git/*" ".git/" \ ! -path './.git/*' \
-x ".gitea/*" ".gitea/" \ ! -path './.gitea/*' \
-x ".env" ".pytest_cache/*" \ ! -name '.env' \
-x "__pycache__/*" "meals.db" \ ! -path './.pytest_cache/*' \
-x "android/.gradle/*" "android/.gradle-home/*" \ ! -path './__pycache__/*' \
-x "android/app/build/*" "android/local.properties" \ ! -name 'meals.db' \
-x "android/gradle/wrapper/gradle-wrapper.jar" \ ! -path './android/.gradle/*' \
-x "android/gradlew.bat" ! -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 - name: Publish release
if: startsWith(github.ref, 'refs/tags/v') if: startsWith(github.ref, 'refs/tags/v')