From 6470e51f971103bbcec57c40359008cad90160e5 Mon Sep 17 00:00:00 2001 From: Aidan Heerdegen Date: Tue, 12 Sep 2023 15:55:59 +1000 Subject: [PATCH] Added logic to only push with tagged commits --- .github/workflows/CD.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/CD.yml b/.github/workflows/CD.yml index df7f1b7e..fc9e2918 100644 --- a/.github/workflows/CD.yml +++ b/.github/workflows/CD.yml @@ -34,6 +34,7 @@ jobs: pypi-build: name: Build package for PyPI + if: github.repository == 'payu-org/payu' && github.event_name == 'push' && startsWith(github.ref, 'refs/tags') runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 @@ -53,6 +54,7 @@ jobs: # Split build and publish to restrict trusted publishing to just this workflow needs: ['pypi-build'] name: Publish to PyPI.org + if: github.repository == 'payu-org/payu' && github.event_name == 'push' && startsWith(github.ref, 'refs/tags') runs-on: ubuntu-latest permissions: # IMPORTANT: this permission is mandatory for trusted publishing