From 0c9bc0e0e9a04aaf84a1e78d1193385013c1f863 Mon Sep 17 00:00:00 2001 From: Pawel Kowalik Date: Sun, 18 Feb 2024 02:28:27 +0100 Subject: [PATCH] CI: Added building distro packages --- .github/workflows/test-and-publish.yml | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test-and-publish.yml b/.github/workflows/test-and-publish.yml index 3733e29..ac86728 100644 --- a/.github/workflows/test-and-publish.yml +++ b/.github/workflows/test-and-publish.yml @@ -55,10 +55,26 @@ jobs: run: | pytest + deploy: + needs: build + runs-on: ubuntu-22.04 + if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') + steps: + - uses: actions/checkout@v4 + - name: Set up Python 3.12 + uses: actions/setup-python@v4 + with: + python-version: 3.12 + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -r requirements.txt + - name: build distribution packages + run: python setup.py sdist bdist_wheel - name: Build and publish to PyPI - if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') && matrix.python-version == '3.12' uses: pypa/gh-action-pypi-publish@v1.4.2 with: user: domain-connect password: ${{ secrets.PYPI_PASSWORD }} skip_existing: true +