CI: Linux runner builds Linux app and Windows portable zip
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
40bb5808ed
commit
2e36b189cf
8 files changed
+169
-132
No files matched your search
@@ -1,5 +1,8 @@
|
||||
# Build Scribd PDF Downloader for Windows, macOS, and Linux.
|
||||
# Requires runners with labels: ubuntu-latest, windows-latest, macos-latest
|
||||
# CI for a Linux-only Gitea runner (ubuntu-latest).
|
||||
#
|
||||
# - linux job: native .tar.gz with bundled Chromium (PyInstaller)
|
||||
# - windows-portable job: zip for Windows (install .bat + source — runs on user's PC)
|
||||
# True Windows .exe cannot be built on Linux (Playwright needs Windows binaries).
|
||||
|
||||
name: Build Scribd
|
||||
|
||||
@@ -21,50 +24,44 @@ env:
|
||||
PYTHON_VERSION: "3.12"
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Build (${{ matrix.platform }})
|
||||
runs-on: ${{ matrix.runs-on }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- platform: windows
|
||||
runs-on: windows-latest
|
||||
artifact: Scribd-PDF-Downloader-Windows.zip
|
||||
- platform: macos
|
||||
runs-on: macos-latest
|
||||
artifact: Scribd-PDF-Downloader-macOS.zip
|
||||
- platform: linux
|
||||
runs-on: ubuntu-latest
|
||||
artifact: Scribd-PDF-Downloader-Linux.tar.gz
|
||||
|
||||
build-linux:
|
||||
name: Linux (.tar.gz)
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v5
|
||||
- uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: ${{ env.PYTHON_VERSION }}
|
||||
cache: pip
|
||||
cache-dependency-path: ${{ env.SCRIBD_DIR }}/requirements-build.txt
|
||||
|
||||
- name: Build (Windows)
|
||||
if: matrix.platform == 'windows'
|
||||
shell: pwsh
|
||||
working-directory: ${{ env.SCRIBD_DIR }}
|
||||
run: ./build/ci/build-windows.ps1
|
||||
|
||||
- name: Build (macOS / Linux)
|
||||
if: matrix.platform != 'windows'
|
||||
shell: bash
|
||||
- name: Build Linux package
|
||||
working-directory: ${{ env.SCRIBD_DIR }}
|
||||
run: chmod +x ./build/ci/build-unix.sh && ./build/ci/build-unix.sh
|
||||
|
||||
- name: Upload artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
- uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: scribd-${{ matrix.platform }}
|
||||
path: ${{ env.SCRIBD_DIR }}/dist/${{ matrix.artifact }}
|
||||
name: scribd-linux
|
||||
path: ${{ env.SCRIBD_DIR }}/dist/Scribd-PDF-Downloader-Linux.tar.gz
|
||||
retention-days: 14
|
||||
|
||||
build-windows-portable:
|
||||
name: Windows (portable zip)
|
||||
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
|
||||
if-no-files-found: error
|
||||
Reference in new issue
Block a user