Skip to content

Commit c2aba0f

Browse files
committed
Add workflow for publishing to pypi
1 parent 5546107 commit c2aba0f

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed

.github/workflows/pypi.yaml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Publish to PyPI
2+
3+
on:
4+
release:
5+
types: [published]
6+
branches: [main]
7+
workflow_dispatch:
8+
9+
jobs:
10+
build-and-publish:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- name: Checkout sources
15+
uses: actions/checkout@v2
16+
17+
- name: Setup Python
18+
uses: actions/setup-python@v2
19+
with:
20+
python-version: "3.10"
21+
22+
- name: Install poetry and dependencies
23+
run: |
24+
python -m pip install --upgrade pip
25+
python -m pip install poetry
26+
27+
- name: Configure poetry
28+
env:
29+
pypi_token: ${{ secrets.PYPI_TOKEN }}
30+
run: poetry config pypi-token.pypi $pypi_token
31+
32+
- name: Build and publish
33+
run: poetry publish --build

0 commit comments

Comments
 (0)