From b6356a00bc3d307c69de700bcc4d9fb110ae3c25 Mon Sep 17 00:00:00 2001 From: Martin Hjelmare Date: Tue, 15 Feb 2022 19:49:53 +0100 Subject: [PATCH] Add github action to publish to PyPI (#370) --- .github/workflows/publish.yml | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 .github/workflows/publish.yml diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..54eb9d1 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,27 @@ +name: Publish releases to PyPI + +on: + release: + types: [published, prereleased] + +jobs: + deploy: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2.4.0 + - name: Set up Python 3.6 + uses: actions/setup-python@v2.3.2 + with: + python-version: 3.6 + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install wheel + - name: Build + run: | + python setup.py sdist bdist_wheel + - name: Publish release to PyPI + uses: pypa/gh-action-pypi-publish@v1.5.0 + with: + user: __token__ + password: ${{ secrets.PYPI_TOKEN }}