Skip to content

Commit 06b9d2e

Browse files
committed
PyPI upload
1 parent 7161a47 commit 06b9d2e

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed

.github/workflows/pypi.yaml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Upload to PyPI
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
jobs:
8+
upload:
9+
runs-on: ubuntu-latest
10+
11+
steps:
12+
- uses: actions/checkout@v3
13+
14+
- uses: actions/setup-python@v4
15+
with:
16+
python-version: "3.12"
17+
18+
- name: Install build dependencies
19+
run: |
20+
python -m pip install --upgrade pip
21+
pip install build twine
22+
23+
- name: Build package
24+
run: python -m build
25+
26+
- name: Publish to PyPI Test
27+
env:
28+
TWINE_USERNAME: __token__
29+
TWINE_PASSWORD: ${{ secrets.PYPI_TEST_TOKEN }}
30+
run: twine upload --repository testpypi dist/*
31+
32+
- name: Publish to PyPI
33+
env:
34+
TWINE_USERNAME: __token__
35+
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
36+
run: twine upload --repository pypi dist/*

0 commit comments

Comments
 (0)