v1.0.0 #11
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |