From ab97abb38d1eaf3157475da0ee781e5006747388 Mon Sep 17 00:00:00 2001 From: Jan Janssen Date: Fri, 5 Feb 2021 15:36:53 +0100 Subject: [PATCH] Create deploy.yml --- .github/workflows/deploy.yml | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 .github/workflows/deploy.yml diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 0000000..6583373 --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,32 @@ +name: PyPi Release + +on: + push: + pull_request: + +# based on https://github.com/pypa/gh-action-pypi-publish +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-python@v2 + with: + python-version: 3.8 + + - name: Install dependencies + run: >- + python -m pip install --user --upgrade setuptools wheel + - name: Convert dependencies + run: >- + sed -i 's/==/>=/g' setup.py; cat setup.py + - name: Build + run: >- + python setup.py sdist bdist_wheel + - name: Publish distribution 📦 to PyPI + if: startsWith(github.event.ref, 'refs/tags') || github.event_name == 'release' + uses: pypa/gh-action-pypi-publish@master + with: + user: __token__ + password: ${{ secrets.pypi_password }}