From 94e9beacedd9aae72b3a0e8e64ebec3295acae4d Mon Sep 17 00:00:00 2001 From: Matthew Scroggs Date: Fri, 9 Jul 2021 12:20:19 +0100 Subject: [PATCH] automate push to pypi --- .github/workflows/on-release.yml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/.github/workflows/on-release.yml b/.github/workflows/on-release.yml index cc42f581..c960d69a 100644 --- a/.github/workflows/on-release.yml +++ b/.github/workflows/on-release.yml @@ -41,6 +41,25 @@ jobs: tags: bempp/cl-notebook:${{ steps.tag_name.outputs.SOURCE_TAG }} target: lab + build-and-publish-pypi: + name: Build and publish to PyPI + runs-on: ubuntu-20.04 + steps: + - uses: actions/checkout@master + - name: Set up Python 3.7 + uses: actions/setup-python@v1 + with: + python-version: 3.7 + - name: Build a binary wheel and a source tarball + run: | + pip install wheel + python setup.py bdist_wheel + python setup.py sdist --formats=gztar + - name: Publish to PyPI + uses: pypa/gh-action-pypi-publish@master + with: + password: ${{ secrets.pypi_password }} + tweet: name: Tweet about latest version runs-on: ubuntu-20.04