Files
webnews/scripts/publish_build.sh
Sudo-Ivan ec37403369
All checks were successful
OSV-Scanner Scheduled Scan / scan-scheduled (push) Successful in 16s
CI / build-frontend (push) Successful in 41s
CI / build-backend (push) Successful in 24s
Add Android build process and CI configuration
- Updated Makefile to remove explicit JAVA_HOME export, simplifying the android-build command.
- Added Java setup step in the Gitea workflow to ensure the correct Java version is used during builds.
- Modified publish_build.sh to include the Android APK build step and copy the generated APK to the distribution directory.
2025-12-27 12:11:20 -06:00

38 lines
969 B
Bash

#!/usr/bin/env bash
set -euo pipefail
mkdir -p dist
echo "Building frontend..."
bash scripts/build.sh
echo "Building server binaries..."
make release
mv bin/web-news-* dist/
echo "Building desktop binaries (Linux)..."
make desktop-build
cp desktop/build/bin/web-news dist/web-news-desktop-linux
echo "Building desktop binaries (Windows)..."
make desktop-windows
cp desktop/build/bin/web-news.exe dist/web-news-desktop-windows.exe
echo "Building desktop binaries (Mac)..."
make desktop-darwin
if [ -d "desktop/build/bin/Web News.app" ]; then
cd desktop/build/bin && zip -r ../../../dist/web-news-desktop-darwin.app.zip "Web News.app" && cd ../../..
elif [ -f "desktop/build/bin/web-news" ]; then
cp desktop/build/bin/web-news dist/web-news-desktop-darwin
fi
echo "Building Android APK..."
make android-build
cp bin/android/web-news-debug.apk dist/web-news-android-debug.apk
echo "Generating SHA256 hashes..."
cd dist
sha256sum * > SHA256SUMS
cat SHA256SUMS