-
Notifications
You must be signed in to change notification settings - Fork 1
43 lines (34 loc) · 1.03 KB
/
publish.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
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