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/*