From 99f867ff0f4f1a28c796e4a30b8f4e0e5389e6fe Mon Sep 17 00:00:00 2001 From: Jonathan de Bruin Date: Wed, 29 Jan 2020 15:40:49 +0100 Subject: [PATCH] Create Python PyPi build and release workflow (#3) --- .github/workflows/pythonpublish.yml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 .github/workflows/pythonpublish.yml diff --git a/.github/workflows/pythonpublish.yml b/.github/workflows/pythonpublish.yml new file mode 100644 index 0000000..2468bf4 --- /dev/null +++ b/.github/workflows/pythonpublish.yml @@ -0,0 +1,28 @@ +name: Upload Python Package + +on: + release: + types: [created] + +jobs: + deploy: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Set up Python + uses: actions/setup-python@v1 + with: + python-version: '3.x' + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install setuptools wheel + - name: Build and publish + run: | + python setup.py sdist bdist_wheel + - name: Publish package + if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags') + uses: pypa/gh-action-pypi-publish@master + with: + user: __token__ + password: ${{ secrets.pypi_password }}