@@ -160,37 +160,82 @@ jobs:
160160 echo "📦 Building: $ZIP_FILENAME.zip"
161161 echo "🏷️ Category: $CATEGORY, Framework: $FRAMEWORK"
162162
163- # Start with default exclusions
164- EXCLUDE_ARGS="-x .git/* -x node_modules/* -x __pycache__/* -x *.pyc -x *.pyo"
165- EXCLUDE_ARGS="$EXCLUDE_ARGS -x dist/* -x build/* -x venv/* -x .venv/*"
166- EXCLUDE_ARGS="$EXCLUDE_ARGS -x .pytest_cache/* -x .coverage -x coverage/*"
167- EXCLUDE_ARGS="$EXCLUDE_ARGS -x *.log -x .DS_Store -x Thumbs.db -x .idea/* -x .vscode/*"
168- EXCLUDE_ARGS="$EXCLUDE_ARGS -x temp/* -x tmp/* -x *.tmp -x .cache/* -x .next/*"
169- EXCLUDE_ARGS="$EXCLUDE_ARGS -x target/* -x .gradle/* -x bin/* -x obj/*"
170- EXCLUDE_ARGS="$EXCLUDE_ARGS -x .env -x .env.local -x .env.production -x .env.development"
163+ # Debug: Show hidden files before zipping
164+ echo "📄 Hidden config files in directory:"
165+ ls -la | grep "^\." | grep -E "(gitignore|env\.example|eslintrc|cursorignore)" || echo "No relevant hidden files found"
171166
172- # Add custom exclusions from config
167+ # Create zip with explicit exclusions
168+ zip -r "../../artifacts/${ZIP_FILENAME}.zip" . \
169+ --exclude=".git/*" \
170+ --exclude="node_modules/*" \
171+ --exclude="__pycache__/*" \
172+ --exclude="*.pyc" \
173+ --exclude="*.pyo" \
174+ --exclude="dist/*" \
175+ --exclude="build/*" \
176+ --exclude="venv/*" \
177+ --exclude=".venv/*" \
178+ --exclude=".pytest_cache/*" \
179+ --exclude=".coverage" \
180+ --exclude="coverage/*" \
181+ --exclude="*.log" \
182+ --exclude=".DS_Store" \
183+ --exclude="Thumbs.db" \
184+ --exclude=".idea/*" \
185+ --exclude=".vscode/*" \
186+ --exclude="temp/*" \
187+ --exclude="tmp/*" \
188+ --exclude="*.tmp" \
189+ --exclude=".cache/*" \
190+ --exclude=".next/*" \
191+ --exclude="target/*" \
192+ --exclude=".gradle/*" \
193+ --exclude="bin/*" \
194+ --exclude="obj/*" \
195+ --exclude=".env" \
196+ --exclude=".env.local" \
197+ --exclude=".env.production" \
198+ --exclude=".env.development"
199+
200+ # Add custom exclusions from config if they exist
173201 if grep -q "^exclude_patterns:" release-config.yml; then
174- echo "📋 Adding custom exclusions from config"
202+ echo "📋 Adding custom exclusions from config..."
203+
204+ # Create a temporary zip with custom exclusions
205+ TEMP_ZIP="../../artifacts/temp_${ZIP_FILENAME}.zip"
206+ mv "../../artifacts/${ZIP_FILENAME}.zip" "$TEMP_ZIP"
207+
208+ # Extract and re-zip with custom exclusions
209+ mkdir -p temp_extract
210+ cd temp_extract
211+ unzip -q "$TEMP_ZIP"
212+
213+ # Apply custom exclusions
175214 while IFS= read -r line; do
176215 if echo "$line" | grep -q "^ - "; then
177216 pattern=$(echo "$line" | sed 's/^ - "//' | sed 's/"$//' | tr -d ' ')
178217 if [ ! -z "$pattern" ]; then
179- EXCLUDE_ARGS="$EXCLUDE_ARGS -x $pattern"
180- echo " Excluding: $pattern"
218+ echo " Excluding custom pattern: $pattern"
219+ find . -name " $pattern" -delete 2>/dev/null || true
181220 fi
182221 fi
183- done < <(grep -A 20 "^exclude_patterns:" release-config.yml)
222+ done < <(grep -A 20 "^exclude_patterns:" ../release-config.yml)
223+
224+ # Re-create zip
225+ zip -r "../../../artifacts/${ZIP_FILENAME}.zip" .
226+ cd ..
227+ rm -rf temp_extract "$TEMP_ZIP"
184228 fi
185229
186- # Create the zip
187- eval "zip -r \"../../artifacts/${ZIP_FILENAME}.zip\" . $EXCLUDE_ARGS"
188-
189230 cd - > /dev/null
190231
191232 if [ -f "artifacts/${ZIP_FILENAME}.zip" ]; then
192233 SIZE=$(du -h "artifacts/${ZIP_FILENAME}.zip" | cut -f1)
193234 echo "✅ Created: ${ZIP_FILENAME}.zip ($SIZE)"
235+
236+ # Debug: Verify hidden files are included
237+ echo "📦 Checking for hidden config files in zip:"
238+ unzip -l "artifacts/${ZIP_FILENAME}.zip" | grep -E "(\.gitignore|\.env\.example|\.eslintrc|\.cursorignore)" | head -5 || echo "No hidden config files found in zip"
194239 else
195240 echo "❌ Failed to create: ${ZIP_FILENAME}.zip"
196241 fi
@@ -227,6 +272,7 @@ jobs:
227272 done
228273
229274 - name : Generate release notes
275+ if : env.SHOULD_BUILD == 'true'
230276 run : |
231277 echo "📝 Generating release notes..."
232278
0 commit comments