From b684977fdf684ed3312c79aeb425c97b395bef42 Mon Sep 17 00:00:00 2001 From: Otto Winter Date: Tue, 14 Jul 2020 19:43:19 +0200 Subject: [PATCH] Add github actions release script --- .github/workflows/release.yml | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..eb7a626 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,27 @@ +name: Publish Release + +on: + release: + types: [published] + +jobs: + deploy-pypi: + name: Build and publish to PyPi + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Set up Python + uses: actions/setup-python@v1 + with: + python-version: '3.x' + - name: Set up python environment + run: | + pip3 install -e . + pip3 install setuptools wheel twine + - name: Build + run: python setup.py sdist bdist_wheel + - name: Upload + env: + TWINE_USERNAME: __token__ + TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }} + run: twine upload dist/*