From b1bae243a3fc7f73fae86f4b6f3c478dbc6acb4a Mon Sep 17 00:00:00 2001 From: Paul A Date: Thu, 25 Feb 2021 22:13:36 +0100 Subject: [PATCH] Added workflow to automatically push to Pypi --- .github/workflows/publish.yml | 24 ++++++++++++++++++++++++ 1 file changed, 24 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..6c37eb1 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,24 @@ +name: Publish Python 🐍 distributions 📦 to PyPI and TestPyPI +on: push +jobs: + build-n-publish: + name: Build and publish Python 🐍 distributions 📦 to PyPI and TestPyPI + runs-on: ubuntu-18.04 + steps: + - uses: actions/checkout@master + - name: Set up Python 3.7 + uses: actions/setup-python@v1 + with: + python-version: 3.7 + - name: Build and archive the lib + run: python setup.py sdist + # - name: Publish distribution 📦 to Test PyPI + # uses: pypa/gh-action-pypi-publish@master + # with: + # password: ${{ secrets.TEST_PYPI_API_TOKEN }} + # repository_url: https://test.pypi.org/legacy/ + - name: Publish distribution 📦 to PyPI + if: startsWith(github.ref, 'refs/tags') + uses: pypa/gh-action-pypi-publish@master + with: + password: ${{ secrets.PYPI_API_TOKEN }}