Skip to content

Commit b5ef7c2

Browse files
committed
feat: Create python-publish.yml
1 parent 63f6767 commit b5ef7c2

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed

.github/workflows/python-publish.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# This workflow will upload a Python Package using Twine when a release is created
2+
3+
name: Upload Python Package
4+
5+
on:
6+
release:
7+
types: [published]
8+
9+
permissions:
10+
contents: read
11+
12+
jobs:
13+
deploy:
14+
15+
runs-on: ubuntu-latest
16+
17+
steps:
18+
- uses: actions/checkout@v4
19+
- name: Set up Python
20+
uses: actions/setup-python@v3
21+
with:
22+
python-version: '3.12'
23+
- name: Install dependencies
24+
run: |
25+
python -m pip install --upgrade pip
26+
pip install poetry
27+
poetry install --with dev
28+
- name: Build package
29+
run: poetry build
30+
- name: Publish package
31+
run: |
32+
poetry config pypi-token.pypi ${{ secrets.PYPI_TOKEN }}
33+
poetry publish

0 commit comments

Comments
 (0)