@@ -111,6 +111,19 @@ jobs:
111111 echo ""
112112 echo "Directory structure:"
113113 ls -laR . | head -50
114+ echo ""
115+ echo "🔍 Verifying critical files:"
116+ if [ -f "manifest.json" ]; then
117+ echo "✅ manifest.json found ($(wc -c < manifest.json) bytes)"
118+ head -5 manifest.json
119+ else
120+ echo "❌ manifest.json NOT FOUND"
121+ fi
122+ if [ -d "pkg" ]; then
123+ echo "✅ pkg directory found with $(ls -1 pkg | wc -l) files"
124+ else
125+ echo "❌ pkg directory NOT FOUND"
126+ fi
114127
115128 - name : Copy extension files
116129 if : steps.release.outputs.skip != 'true'
@@ -121,11 +134,42 @@ jobs:
121134 # Copy extension files (handle both root and extension-package/ subdirectory)
122135 # Check root first, then extension-package/ subdirectory
123136 if [ -f "extension-temp/manifest.json" ]; then
124- cp extension-temp/manifest.json src/extension/
137+ size=$(wc -c < extension-temp/manifest.json)
138+ if [ "$size" -gt 0 ]; then
139+ echo "✅ Copying manifest.json ($size bytes)"
140+ cp extension-temp/manifest.json src/extension/
141+ # Verify copy
142+ if [ -f "src/extension/manifest.json" ] && [ "$(wc -c < src/extension/manifest.json)" -gt 0 ]; then
143+ echo "✅ manifest.json copied successfully"
144+ else
145+ echo "❌ manifest.json copy failed or file is empty"
146+ exit 1
147+ fi
148+ else
149+ echo "❌ manifest.json is empty ($size bytes)"
150+ exit 1
151+ fi
125152 elif [ -f "extension-temp/extension-package/manifest.json" ]; then
126- cp extension-temp/extension-package/manifest.json src/extension/
153+ size=$(wc -c < extension-temp/extension-package/manifest.json)
154+ if [ "$size" -gt 0 ]; then
155+ echo "✅ Copying manifest.json from extension-package/ ($size bytes)"
156+ cp extension-temp/extension-package/manifest.json src/extension/
157+ # Verify copy
158+ if [ -f "src/extension/manifest.json" ] && [ "$(wc -c < src/extension/manifest.json)" -gt 0 ]; then
159+ echo "✅ manifest.json copied successfully"
160+ else
161+ echo "❌ manifest.json copy failed or file is empty"
162+ exit 1
163+ fi
164+ else
165+ echo "❌ manifest.json is empty ($size bytes)"
166+ exit 1
167+ fi
127168 else
128- echo "⚠️ manifest.json not found"
169+ echo "❌ manifest.json not found in extension-temp/"
170+ echo "Available files:"
171+ find extension-temp -type f | head -20
172+ exit 1
129173 fi
130174
131175 if [ -f "extension-temp/content.js" ]; then
0 commit comments