From 9c5e72f15b8c590ae305d9d640b6df19fcd7b11c Mon Sep 17 00:00:00 2001 From: Jon Michael Aanes Date: Sat, 30 Mar 2024 16:14:58 +0100 Subject: [PATCH] Conditional publish --- .gitea/workflows/python-package.yaml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.gitea/workflows/python-package.yaml b/.gitea/workflows/python-package.yaml index d7d227a..223734b 100644 --- a/.gitea/workflows/python-package.yaml +++ b/.gitea/workflows/python-package.yaml @@ -3,6 +3,9 @@ name: Python Package on: workflow_call: inputs: + PUBLISH: + required: false + default: false secrets: PIPY_REPO_USER: required: true @@ -28,7 +31,9 @@ jobs: - name: Test Python Code run: python3 -m pytest test - name: Build + if: always() && inputs.PUBLISH run: python3 -m build - name: Publish + if: always() && inputs.PUBLISH run: python3 -m twine upload --repository-url "https://gitfub.space/api/packages/${{ secrets.PIPY_REPO_USER }}/pypi" -u ${{ secrets.PIPY_REPO_USER }} -p ${{ secrets.PIPY_REPO_PASS }} dist/*