Skip to content

Commit b02d5d5

Browse files
committed
Merge remote-tracking branch 'uni/main' into main
2 parents 435e9ee + 6bbeddd commit b02d5d5

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

.github/workflows/pypi-release.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Release library as a PyPI wheel and sdist on tag
2+
3+
on:
4+
release:
5+
types: [created]
6+
7+
jobs:
8+
build-and-publish-to-pypi:
9+
name: Build and publish library to PyPI
10+
runs-on: ubuntu-20.04
11+
steps:
12+
- uses: actions/checkout@master
13+
- name: Set up Python
14+
uses: actions/setup-python@v1
15+
with:
16+
python-version: 3.8
17+
- name: Install pypa/build
18+
run: python -m pip install build --user
19+
- name: Build a binary wheel and a source tarball
20+
run: python -m build --sdist --wheel --outdir dist/
21+
.
22+
- name: Publish distribution to PyPI
23+
if: startsWith(github.ref, 'refs/tags')
24+
uses: pypa/gh-action-pypi-publish@master
25+
with:
26+
password: ${{ secrets.PYPI_API_TOKEN }}
27+

0 commit comments

Comments
 (0)