From d57ab70cfd375c3ba3b08b6791f5540106c674bc Mon Sep 17 00:00:00 2001 From: Laura Meneghetti Date: Thu, 21 Oct 2021 10:59:52 +0200 Subject: [PATCH] Added file pypi-publish.yml --- .github/workflows/pypi_publish.yml | 31 ++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 .github/workflows/pypi_publish.yml diff --git a/.github/workflows/pypi_publish.yml b/.github/workflows/pypi_publish.yml new file mode 100644 index 0000000..9fb5c70 --- /dev/null +++ b/.github/workflows/pypi_publish.yml @@ -0,0 +1,31 @@ +name: "PYPI Publish" + +on: + push: + tags: + - "*" + +jobs: + docs: + runs-on: ubuntu-18.04 + steps: + - uses: actions/checkout@v2 + + - name: Set up Python 3.7 + uses: actions/setup-python@v1 + with: + python-version: 3.7 + + - name: Install build + run: >- + python -m pip install build --user + + - name: Build a binary wheel and a source tarball + run: >- + python -m build --sdist --wheel --outdir dist/ . + + - name: Publish distribution to PyPI + if: startsWith(github.ref, 'refs/tags') + uses: pypa/gh-action-pypi-publish@master + with: + password: ${{ secrets.PYPI_API_TOKEN }}