Skip to content

Workflow file for this run

name: Build and upload to PyPI
on:
release:
types: [published]
jobs:
publish:
runs-on: ubuntu-22.04
permissions:
id-token: write # mandatory for PyPI trusted publishing
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version-file: scraper/pyproject.toml
architecture: x64
- name: Build packages
working-directory: scraper
run: |
pip install -U pip build
python -m build --sdist --wheel
- name: Upload to PyPI
uses: pypa/gh-action-pypi-publish@release/v1.9
with:
packages-dir: scraper/dist/
- name: Build and push Docker image
uses: openzim/docker-publish-action@v10
with:
image-name: openzim/youtube
tag-pattern: /^v([0-9.]+)$/
latest-on-tag: true
restrict-to: openzim/youtube
registries: ghcr.io
credentials:
GHCRIO_USERNAME=${{ secrets.GHCR_USERNAME }}
GHCRIO_TOKEN=${{ secrets.GHCR_TOKEN }}
repo_description: auto
repo_overview: auto