From 89a7a733de25589e494bc448428940df46bc899b Mon Sep 17 00:00:00 2001 From: "Schmieder, Jacob" Date: Fri, 31 May 2024 14:34:02 +0000 Subject: [PATCH] updated run conditon --- .github/workflows/pypi.yml | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/.github/workflows/pypi.yml b/.github/workflows/pypi.yml index 0b5bd0b..a76369e 100644 --- a/.github/workflows/pypi.yml +++ b/.github/workflows/pypi.yml @@ -1,19 +1,21 @@ name: Publish Python 🐍 distribution 📦 to PyPI and TestPyPI on: - push: - tags: - - v* # Push tags to trigger the workflow pull_request: types: [closed] branches: - develop + - main workflow_dispatch: inputs: - test: - description: "Push to TestPyPI not PyPI" - default: true - type: boolean + job: + description: "Select job to run" + required: true + type: choice + options: + - Build-and-publish-to-Test-PyPI + - test-install + - publish-to-pypi jobs: Build-and-publish-to-Test-PyPI: @@ -57,6 +59,7 @@ jobs: steps: - name: Checkout Repository Tags uses: actions/checkout@v4 + if: github.ref == 'refs/heads/main' with: fetch-depth: '0' branch: 'main'