Skip to content

Commit 183934c

Browse files
author
jayeshmepani
committed
feat: add PyPI publishing workflow
1 parent 5c731ef commit 183934c

1 file changed

Lines changed: 30 additions & 0 deletions

File tree

.github/workflows/publish-pypi.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Publish to PyPI
2+
3+
on:
4+
release:
5+
types: [published]
6+
workflow_dispatch: # Allow manual triggering
7+
8+
jobs:
9+
build-and-publish:
10+
name: Build and publish to PyPI
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- uses: actions/checkout@v4
15+
16+
- name: Set up Python
17+
uses: actions/setup-python@v5
18+
with:
19+
python-version: "3.10"
20+
21+
- name: Install build dependencies
22+
run: python -m pip install --upgrade pip build twine
23+
24+
- name: Build Python Package (sdist and wheel)
25+
run: python -m build
26+
27+
- name: Publish package to PyPI
28+
uses: pypa/gh-action-pypi-publish@release/v1
29+
with:
30+
password: ${{ secrets.PYPI_API_TOKEN }}

0 commit comments

Comments
 (0)