From 9ebeb51d1b7669369f0584a327c89772b41c214c Mon Sep 17 00:00:00 2001 From: danialmalik Date: Tue, 4 Aug 2020 12:19:28 +0500 Subject: [PATCH] Add github workflow to automate pypi release --- .github/workflows/publish_to_pypi.yml | 31 +++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 .github/workflows/publish_to_pypi.yml diff --git a/.github/workflows/publish_to_pypi.yml b/.github/workflows/publish_to_pypi.yml new file mode 100644 index 0000000..5ca23a7 --- /dev/null +++ b/.github/workflows/publish_to_pypi.yml @@ -0,0 +1,31 @@ +name: Publish the app distributions to PyPI + +on: + push: + tags: + - 'v*' + +jobs: + build-n-publish: + name: Build and publish the app distribution to PyPI + runs-on: ubuntu-18.04 + steps: + - uses: actions/checkout@master + - name: Set up Python 2.7 + uses: actions/setup-python@v1 + with: + python-version: 2.7 + + - name: Install twine and wheel + run: | + python -m pip install twine wheel + + - name: Build a binary wheel and a source tarball + run: | + python setup.py sdist bdist_wheel + + - name: Publish distribution 📦 to PyPI + uses: pypa/gh-action-pypi-publish@master + with: + user: __token__ + password: ${{ secrets.PYPI_SECRET }}