Skip to content

Commit a26872e

Browse files
committed
add auto-release push to PyPI
1 parent d3a10f4 commit a26872e

File tree

2 files changed

+26
-2
lines changed

2 files changed

+26
-2
lines changed

.github/workflows/release.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Upload Python Package
2+
3+
on:
4+
release:
5+
types: [created]
6+
7+
jobs:
8+
deploy:
9+
runs-on: ubuntu-latest
10+
11+
steps:
12+
- uses: actions/checkout@v3
13+
- uses: actions/setup-python@v3
14+
- name: Install dependencies
15+
run: |
16+
python -m pip install --upgrade pip
17+
pip install setuptools wheel twine
18+
- name: Build and publish
19+
env:
20+
TWINE_USERNAME: __token__
21+
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
22+
run: |
23+
python setup.py sdist bdist_wheel
24+
twine upload dist/*

.gitignore

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@ venv/
88
*/__pycache__/
99

1010
# PyPI integration file
11-
.pypirc
12-
build
11+
./build
12+
./dist
1313
*.egg-info

0 commit comments

Comments
 (0)