Files
PDF-Downloaders/.gitea/workflows/build-scribd.yml
T

86 lines
2.3 KiB
YAML

# Linux runner builds:
# - Linux native .tar.gz (PyInstaller)
# - Windows .exe zip (Docker + Wine cross-build)
# - Windows portable zip (fallback, no Docker)
name: Build Scribd
on:
push:
branches: [main, master]
paths:
- "Scribd/**"
- ".gitea/workflows/**"
- ".github/workflows/**"
pull_request:
branches: [main, master]
paths:
- "Scribd/**"
workflow_dispatch:
env:
SCRIBD_DIR: Scribd
PYTHON_VERSION: "3.12"
jobs:
build-linux:
name: Linux (.tar.gz)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ env.PYTHON_VERSION }}
cache: pip
cache-dependency-path: ${{ env.SCRIBD_DIR }}/requirements-build.txt
- name: Build Linux package
working-directory: ${{ env.SCRIBD_DIR }}
run: chmod +x ./build/ci/build-unix.sh && ./build/ci/build-unix.sh
- uses: actions/upload-artifact@v4
with:
name: scribd-linux
path: ${{ env.SCRIBD_DIR }}/dist/Scribd-PDF-Downloader-Linux.tar.gz
retention-days: 14
build-windows-exe:
name: Windows (.exe via Wine/Docker)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build Windows exe (cross-compile on Linux)
working-directory: ${{ env.SCRIBD_DIR }}
run: |
chmod +x ./build/ci/docker-build-windows.sh
./build/ci/docker-build-windows.sh
- uses: actions/upload-artifact@v4
with:
name: scribd-windows
path: ${{ env.SCRIBD_DIR }}/dist/Scribd-PDF-Downloader-Windows.zip
retention-days: 14
if-no-files-found: error
build-windows-portable:
name: Windows (portable zip fallback)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Package Windows portable
working-directory: ${{ env.SCRIBD_DIR }}
run: |
chmod +x ./build/ci/package-windows-portable.sh
sudo apt-get update -qq
sudo apt-get install -y zip
./build/ci/package-windows-portable.sh
- uses: actions/upload-artifact@v4
with:
name: scribd-windows-portable
path: ${{ env.SCRIBD_DIR }}/dist/Scribd-PDF-Downloader-Windows-Portable.zip
retention-days: 14