Skip to content

Commit ba078eb

Browse files
authored
add a publishing CI (#27)
1 parent 812c003 commit ba078eb

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

.github/workflows/publish.yaml

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

0 commit comments

Comments
 (0)