From fbfb0ebd33200b41de1df4b353012d4035ac9299 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20K=C3=A4ufl?= Date: Sun, 21 Mar 2021 10:46:29 +0100 Subject: [PATCH] Add a release workflow --- .github/workflows/release.yml | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 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 00000000..64e7aaaf --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,33 @@ +--- +name: Release + +on: + release: + types: [created] + +jobs: + deploy: + runs-on: ubuntu-latest + environment: deploy + + steps: + - uses: actions/checkout@v2 + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: 3.6 + - name: Install dependencies + run: | + python -m pip install --upgrade "twine>=3.4.1" "wheel>=0.36.2" + - name: Build package + run: | + python setup.py sdist bdist_wheel + - name: Check basics before uploading the package + run: | + python -m tox -e package + - name: Publish package on PyPI + env: + TWINE_USERNAME: __token__ + TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }} + run: | + twine upload dist/*