Skip to content

Release to PyPI

Release to PyPI #8

Workflow file for this run

name: Release to PyPI
# Trigger the workflow when a release is created in GitHub
on:
release:
types: [created]
workflow_dispatch:
permissions:
contents: read
id-token: write # Required for OIDC-based authentication
jobs:
pypi-publish:
name: Publish release to PyPI
runs-on: ubuntu-latest
# Optional: Specify the environment name and URL
environment:
name: pypi
url: https://pypi.org/project/libcrawler/ # Replace with your PyPI project URL if needed
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.x"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel
- name: Build package
run: |
# You can use 'python setup.py sdist bdist_wheel' or 'python -m build'
python -m build sdist
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1