Skip to content

Commit 19e100b

Browse files
added pypi pushblish action
1 parent 284529a commit 19e100b

1 file changed

Lines changed: 32 additions & 0 deletions

File tree

.github/workflows/publish.yml

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

0 commit comments

Comments
 (0)