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.
This commit is contained in:
+14
-9
@@ -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')
|
||||
|
||||
Reference in New Issue
Block a user