Skip to content

Commit 166f17d

Browse files
committed
Feat: Added pipeline for publishing to pip
1 parent 8b41395 commit 166f17d

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

.github/workflows/pypi_publish.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Publish to PyPI on merge to main
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
jobs:
9+
build-and-upload-testpypi:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- name: Checkout source
14+
uses: actions/checkout@v4
15+
16+
- name: Set up Python
17+
uses: actions/setup-python@v5
18+
with:
19+
python-version: '3.12.3'
20+
21+
- name: Install build tools
22+
run: |
23+
python3 -m pip install --upgrade pip
24+
python3 -m pip install --upgrade build
25+
python3 -m pip install --upgrade twine
26+
27+
- name: Build package
28+
run: python3 -m build
29+
30+
- name: Upload to PyPI
31+
env:
32+
TWINE_USERNAME: __token__
33+
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
34+
run: |
35+
python3 -m twine upload dist/*

0 commit comments

Comments
 (0)