Skip to content

Commit 257d51a

Browse files
authored
add a CI publishing to PyPI (#36)
* add a ci to publish to pypi when pushing new tags * fix the version typo * publish to PyPI instead of TestPyPI
1 parent fd0df21 commit 257d51a

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

.github/workflows/pypi.yaml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Upload Package to PyPI
2+
3+
on:
4+
release:
5+
types: [created]
6+
7+
jobs:
8+
deploy:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v1
12+
- name: Set up Python
13+
uses: actions/setup-python@v1
14+
with:
15+
python-version: '3.x'
16+
- name: Install dependencies
17+
run: |
18+
python -m pip install --upgrade pip pep517 twine
19+
- name: Build
20+
run: |
21+
python -m pep517.build --source --binary --out-dir dist/ .
22+
- name: Check the built archives
23+
run: |
24+
twine check dist/*
25+
- name: Publish to PyPI
26+
uses: pypa/[email protected]
27+
with:
28+
user: __token__
29+
password: ${{ secrets.pypi_password }}
30+
repository_url: https://upload.pypi.org/legacy/

0 commit comments

Comments
 (0)