Add Gitea Actions CI for Windows, macOS, and Linux builds
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
5d2933ea95
commit
ad6e35ac4e
8 files changed
+399
-1
No files matched your search
@@ -0,0 +1,42 @@
|
||||
#!/usr/bin/env bash
|
||||
# CI build script for macOS and Linux (Gitea/GitHub Actions).
|
||||
set -euo pipefail
|
||||
|
||||
echo "=== CI build: $(uname -s) ==="
|
||||
|
||||
python -m pip install --upgrade pip
|
||||
pip install -r requirements-build.txt
|
||||
|
||||
export PLAYWRIGHT_BROWSERS_PATH=0
|
||||
playwright install chromium
|
||||
|
||||
if [[ "$(uname)" == "Linux" ]]; then
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y python3-tk tk-dev
|
||||
sudo playwright install-deps chromium
|
||||
fi
|
||||
|
||||
pyinstaller --noconfirm --clean build/scribd_gui.spec
|
||||
|
||||
if [[ "$(uname)" == "Darwin" ]]; then
|
||||
APP="dist/Scribd PDF Downloader.app"
|
||||
if [[ ! -d "$APP" ]]; then
|
||||
echo "Error: $APP not found"
|
||||
exit 1
|
||||
fi
|
||||
codesign --force --deep --sign - "$APP" 2>/dev/null || true
|
||||
rm -f "dist/Scribd-PDF-Downloader-macOS.zip"
|
||||
ditto -c -k --sequesterRsrc --keepParent "$APP" "dist/Scribd-PDF-Downloader-macOS.zip"
|
||||
echo "Created dist/Scribd-PDF-Downloader-macOS.zip"
|
||||
else
|
||||
DIR="dist/Scribd PDF Downloader"
|
||||
if [[ ! -d "$DIR" ]]; then
|
||||
echo "Error: $DIR not found"
|
||||
exit 1
|
||||
fi
|
||||
cp -f config.ini "$DIR/" 2>/dev/null || true
|
||||
chmod +x "$DIR/Scribd PDF Downloader" 2>/dev/null || true
|
||||
rm -f "dist/Scribd-PDF-Downloader-Linux.tar.gz"
|
||||
tar -czf "dist/Scribd-PDF-Downloader-Linux.tar.gz" -C dist "Scribd PDF Downloader"
|
||||
echo "Created dist/Scribd-PDF-Downloader-Linux.tar.gz"
|
||||
fi
|
||||
@@ -0,0 +1,25 @@
|
||||
# CI build script for Windows (used by Gitea/GitHub Actions).
|
||||
$ErrorActionPreference = "Stop"
|
||||
|
||||
Write-Host "=== CI build: Windows ===" -ForegroundColor Cyan
|
||||
|
||||
python -m pip install --upgrade pip
|
||||
pip install -r requirements-build.txt
|
||||
|
||||
$env:PLAYWRIGHT_BROWSERS_PATH = "0"
|
||||
playwright install chromium
|
||||
|
||||
pyinstaller --noconfirm --clean "build\scribd_gui.spec"
|
||||
|
||||
$Dist = "dist\Scribd PDF Downloader"
|
||||
if (-not (Test-Path $Dist)) {
|
||||
throw "Build output not found: $Dist"
|
||||
}
|
||||
|
||||
Copy-Item "config.ini" $Dist -Force -ErrorAction SilentlyContinue
|
||||
|
||||
$Zip = "dist\Scribd-PDF-Downloader-Windows.zip"
|
||||
if (Test-Path $Zip) { Remove-Item $Zip -Force }
|
||||
Compress-Archive -Path $Dist -DestinationPath $Zip
|
||||
|
||||
Write-Host "Created $Zip" -ForegroundColor Green
|
||||
Reference in new issue
Block a user