Skip to content

Commit e968ff4

Browse files
authored
Create publish_pypi.yml
1 parent c97c39d commit e968ff4

1 file changed

Lines changed: 29 additions & 0 deletions

File tree

.github/workflows/publish_pypi.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Publish to PyPI
2+
3+
on:
4+
push:
5+
branches:
6+
- main # Only trigger on the main branch
7+
8+
jobs:
9+
deploy:
10+
name: Build and Publish
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- name: Checkout repository
15+
uses: actions/checkout@v4
16+
17+
- name: Set up Python
18+
uses: actions/setup-python@v4
19+
with:
20+
python-version: "3.x"
21+
22+
- name: Install Poetry
23+
run: pip install poetry
24+
25+
- name: Authenticate PyPI
26+
run: poetry config pypi-token.pypi "${{ secrets.PYPI_API_TOKEN }}"
27+
28+
- name: Publish to PyPI
29+
run: poetry publish --build --no-interaction

0 commit comments

Comments
 (0)