From a989df12dc25fee625e2ba79819f60463afe2fb7 Mon Sep 17 00:00:00 2001 From: Tobias Bengfort Date: Fri, 16 Jun 2023 16:52:45 +0200 Subject: [PATCH] github actions: publish to pypi automatically see https://packaging.python.org/en/latest/guides/publishing-package-distribution-releases-using-github-actions-ci-cd-workflows/ --- .github/workflows/main.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 40407bb..1fae981 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -30,3 +30,16 @@ jobs: run: | coverage run -m tests.manage test coverage report + publish: + needs: [lint, test] + if: startsWith(github.ref, 'refs/tags') + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-python@v4 + - name: build + run: python3 setup.py bdist_wheel sdist + - name: publish + uses: pypa/gh-action-pypi-publish@release/v1 + with: + password: ${{ secrets.PYPI_API_TOKEN }}