From 7444e9ecd8977b9fd4bae85659b4759ca8594215 Mon Sep 17 00:00:00 2001 From: Geoff Boeing Date: Mon, 9 Dec 2024 16:27:05 -0800 Subject: [PATCH] only publish if tags are pushed --- .github/workflows/build-publish-pypi.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/build-publish-pypi.yml b/.github/workflows/build-publish-pypi.yml index 802f8c6f..7f02bff7 100644 --- a/.github/workflows/build-publish-pypi.yml +++ b/.github/workflows/build-publish-pypi.yml @@ -11,7 +11,6 @@ on: - 'v*' schedule: - cron: "40 4 * * 1" # every monday at 04:40 UTC - workflow_dispatch: jobs: build_publish_pypi: @@ -43,5 +42,5 @@ jobs: python -m twine check --strict ./dist/* - name: Publish package to PyPI - if: ${{ github.event_name != 'schedule' }} + if: ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/tags') }} uses: pypa/gh-action-pypi-publish@release/v1