Skip to content

Commit 69053de

Browse files
authored
Create publish.yml
1 parent aa9bc34 commit 69053de

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

.github/workflows/publish.yml

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

0 commit comments

Comments
 (0)