From 92e023b9361ef68491b1e3ac6f684fcd088cf91b Mon Sep 17 00:00:00 2001 From: "Thomas J. Fan" Date: Fri, 8 Dec 2023 23:29:17 -0500 Subject: [PATCH] Push to PyPI only on release --- .github/workflows/publish_pypi.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/publish_pypi.yml b/.github/workflows/publish_pypi.yml index a047f327..7bc95c4a 100644 --- a/.github/workflows/publish_pypi.yml +++ b/.github/workflows/publish_pypi.yml @@ -1,13 +1,14 @@ name: Publish to Pypi on: workflow_dispatch: + release: + types: [published] jobs: build_wheels: name: Build wheels on ${{ matrix.os }} runs-on: ${{ matrix.os }} env: - CIBW_TEST_SKIP: "*_arm64" CIBW_ARCHS_MACOS: "x86_64 arm64" strategy: @@ -49,7 +50,7 @@ jobs: # upload to PyPI on every tag starting with 'v' # if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') # alternatively, to publish when a GitHub Release is created, use the following rule: - # if: github.event_name == 'release' && github.event.action == 'published' + if: github.event_name == 'release' && github.event.action == 'published' steps: - uses: actions/download-artifact@v3 with: