Skip to content

Commit fa28999

Browse files
authored
Merge pull request #23 from LauraMeneghetti/pypi_action
Github action for PyPI
2 parents c6cf35e + d57ab70 commit fa28999

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed

.github/workflows/pypi_publish.yml

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

0 commit comments

Comments
 (0)