From 03e45f2ff8d3e4750e7789fe5571404654fd1640 Mon Sep 17 00:00:00 2001 From: Fabrice Brito Date: Thu, 26 Sep 2024 09:53:20 +0200 Subject: [PATCH] CI pypi if block --- .github/workflows/package.yaml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/package.yaml b/.github/workflows/package.yaml index d70aca1..96b756f 100644 --- a/.github/workflows/package.yaml +++ b/.github/workflows/package.yaml @@ -27,7 +27,15 @@ jobs: run: hatch build - name: Test package run: hatch -e test run nose2 --verbose - - name: Publish package distributions to PyPI + - name: Publish package distributions to Test PyPI + if: github.ref != 'refs/heads/main' uses: pypa/gh-action-pypi-publish@release/v1 with: + skip_existing: true repository-url: https://test.pypi.org/legacy/ + - name: Publish package distributions to PyPI + if: github.ref == 'refs/heads/main' + uses: pypa/gh-action-pypi-publish@release/v1 + with: + skip_existing: true + repository-url: https://upload.pypi.org/legacy/ \ No newline at end of file