78 lines
2.3 KiB
YAML
78 lines
2.3 KiB
YAML
# Release — Linux native build + Windows portable zip (Linux runner only).
|
|
|
|
name: Release Scribd
|
|
|
|
on:
|
|
push:
|
|
tags:
|
|
- "v*"
|
|
workflow_dispatch:
|
|
inputs:
|
|
tag:
|
|
description: "Release tag (e.g. v1.0.0)"
|
|
required: true
|
|
default: "v1.0.0"
|
|
|
|
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
|
|
- 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: 30
|
|
|
|
build-windows-portable:
|
|
name: Windows (portable zip)
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- 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: 30
|
|
|
|
release:
|
|
name: Create Gitea release
|
|
needs: [build-linux, build-windows-portable]
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/download-artifact@v4
|
|
with:
|
|
path: artifacts
|
|
merge-multiple: true
|
|
|
|
- name: Prepare files
|
|
run: |
|
|
mkdir -p release-files
|
|
find artifacts -type f \( -name "*.zip" -o -name "*.tar.gz" \) -exec cp {} release-files/ \;
|
|
ls -la release-files/
|
|
|
|
- name: Publish Gitea release
|
|
uses: https://gitea.com/actions/gitea-release-action@v1
|
|
env:
|
|
GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }}
|
|
with:
|
|
tag_name: ${{ github.event_name == 'workflow_dispatch' && inputs.tag || github.ref_name }}
|
|
files: release-files/*
|