From 249034a214cddc223b7b7d4162f056ceb93899ca Mon Sep 17 00:00:00 2001 From: Denis Laxalde Date: Thu, 17 Jun 2021 15:00:38 +0200 Subject: [PATCH] Add a GH workflow to publish to PyPI upon tag --- .github/workflows/publish.yml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 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..ea37c98 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,28 @@ +name: Publish + +on: + push: + tags: + - '*' + +jobs: + publish: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-python@v2 + with: + python-version: 3.9 + - name: Install + run: python -m pip install setuptools wheel twine + - name: Build + run: | + python setup.py check + python setup.py sdist bdist_wheel + python -m twine check dist/* + - name: Publish + run: python -m twine upload dist/* + env: + TWINE_USERNAME: __token__ + TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}