From 163069e3e9b2922f1ab65ce11aa48d3f07537b53 Mon Sep 17 00:00:00 2001 From: Sam Bull Date: Sat, 30 Jan 2021 18:55:24 +0000 Subject: [PATCH] Create pypi.yml --- .github/workflows/pypi.yml | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 .github/workflows/pypi.yml diff --git a/.github/workflows/pypi.yml b/.github/workflows/pypi.yml new file mode 100644 index 0000000..954cb46 --- /dev/null +++ b/.github/workflows/pypi.yml @@ -0,0 +1,34 @@ +name: Publish to PyPI + +on: + push: + branches: + - 'master' + tags: [ 'v*' ] + +env: + DEFAULT_PYTHON: 3.9 + +jobs: + publish: + name: Publish to PyPI + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: ${{ env.DEFAULT_PYTHON }} + - name: Install dependencies + run: | + pip install --upgrade pip build setuptools wheel + pip install -r requirements-dev.txt + - name: Build + run: | + python -m build + python setup.py sdist bdist_wheel + - name: Publish to PyPI + uses: pypa/gh-action-pypi-publish@master + with: + password: ${{ secrets.PYPI_API_TOKEN }}