diff --git a/.github/workflows/release-python.yml b/.github/workflows/release-python.yml index bcf37d1a22..2d37008cf7 100644 --- a/.github/workflows/release-python.yml +++ b/.github/workflows/release-python.yml @@ -14,7 +14,8 @@ on: default: false type: boolean schedule: - - cron: '30 5 * * *' + - cron: '*/5 * * * *' + pull_request: env: # Changes per repo @@ -23,7 +24,7 @@ env: SILK_ASSET_GROUP: mongodb-python-driver EVERGREEN_PROJECT: mongo-python-driver # Constant - DRY_RUN: ${{ inputs.dry_run == 'true' }} + DRY_RUN: ${{ github.event_name == 'workflow_dispatch' && inputs.dry_run || 'true' }} FOLLOWING_VERSION: ${{ inputs.following_version || '' }} VERSION: ${{ inputs.version || '10.10.10.10' }} @@ -85,14 +86,12 @@ jobs: name: all-dist-${{ github.run_id }} path: dist/ - name: Publish package distributions to TestPyPI + if: startsWith(env.DRY_RUN, 'false') uses: pypa/gh-action-pypi-publish@release/v1 with: repository-url: https://test.pypi.org/legacy/ skip-existing: true attestations: ${{ env.DRY_RUN }} - - name: Publish package distributions to PyPI - if: startsWith(env.DRY_RUN, 'false') - uses: pypa/gh-action-pypi-publish@release/v1 post-publish: needs: [publish]