Skip to content

Commit 125a35e

Browse files
committed
ADFA-1859: Add Brotli compression for documentation DB in release workflow
1 parent 26f1eb9 commit 125a35e

1 file changed

Lines changed: 23 additions & 0 deletions

File tree

‎.github/workflows/release.yml‎

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -262,6 +262,29 @@ jobs:
262262
263263
echo "Successfully downloaded documentation.db ($FILE_SIZE_HUMAN)"
264264
265+
- name: Compress documentation.db with Brotli
266+
run: |
267+
echo "Installing Brotli..."
268+
sudo apt-get update && sudo apt-get install -y brotli
269+
270+
echo "Creating target directory..."
271+
mkdir -p assets/release/common/database
272+
273+
echo "Compressing documentation.db with maximum compression..."
274+
brotli -Z -o assets/release/common/database/documentation.db.br assets/documentation.db
275+
276+
if [ ! -f assets/release/common/database/documentation.db.br ]; then
277+
echo "ERROR: Failed to create documentation.db.br"
278+
exit 1
279+
fi
280+
281+
ORIGINAL_SIZE=$(du -h assets/documentation.db | cut -f1)
282+
COMPRESSED_SIZE=$(du -h assets/release/common/database/documentation.db.br | cut -f1)
283+
284+
echo "Successfully compressed documentation.db"
285+
echo "Original size: $ORIGINAL_SIZE"
286+
echo "Compressed size: $COMPRESSED_SIZE"
287+
265288
- name: Assemble Release APK
266289
run: |
267290
flox activate -d flox/base -- ./gradlew :app:assembleV8Release --no-daemon \

0 commit comments

Comments
 (0)