From 6bcca993955336ccbca8b766bae910099cc2cabc Mon Sep 17 00:00:00 2001 From: Ravnoor Gill Date: Sun, 24 Dec 2023 20:54:43 -0500 Subject: [PATCH] make PyPI publishing conditional on a release --- .github/workflows/wheels-macosx_arm64.yml | 4 +--- .github/workflows/wheels.yml | 3 +-- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/.github/workflows/wheels-macosx_arm64.yml b/.github/workflows/wheels-macosx_arm64.yml index 8b59769c..277f7109 100644 --- a/.github/workflows/wheels-macosx_arm64.yml +++ b/.github/workflows/wheels-macosx_arm64.yml @@ -4,7 +4,6 @@ on: push: branches: - master - - refactor_ci_pypi pull_request: branches: - master @@ -127,6 +126,7 @@ jobs: pypi-publish: name: Upload release to PyPI + if: github.event_name == 'release' needs: [build_wheels] runs-on: ubuntu-latest permissions: @@ -134,7 +134,6 @@ jobs: steps: # retrieve your distributions here - name: Download artifacts - # needs: [build_wheels, build_sdist] uses: actions/download-artifact@v4 with: # unpacks all CIBW artifacts into dist/ @@ -144,7 +143,6 @@ jobs: - name: Publish package to PyPI uses: pypa/gh-action-pypi-publish@release/v1 - # if: ${{ (github.event_name == 'push') && (runner.os == 'Linux') }} with: user: __token__ password: ${{ secrets.PYPI_API_TOKEN }} diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index 8caa8a1f..8db30a97 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -4,7 +4,6 @@ on: push: branches: - master - - refactor_ci_pypi pull_request: branches: - master @@ -217,6 +216,7 @@ jobs: pypi-publish: name: Upload release to PyPI + if: github.event_name == 'release' needs: [build_wheels] runs-on: ubuntu-latest permissions: @@ -233,7 +233,6 @@ jobs: - name: Publish package to PyPI uses: pypa/gh-action-pypi-publish@release/v1 - # if: ${{ (github.event_name == 'push') && (runner.os == 'Linux') }} with: user: __token__ password: ${{ secrets.PYPI_API_TOKEN }}