From ed700295a8c9ff41a5ec7fd551d80d7566d1e334 Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Tue, 24 Mar 2026 08:12:47 -0500 Subject: [PATCH] Fix dry_run handling in publish job for scheduled runs --- .github/workflows/release.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 09a21540..1fd11200 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -30,6 +30,7 @@ jobs: contents: write outputs: tag: ${{ steps.release.outputs.tag }} + dry_run: ${{ github.event_name == 'schedule' && 'true' || inputs.dry_run }} steps: - uses: actions/checkout@v6 with: @@ -63,7 +64,7 @@ jobs: - uses: hynek/build-and-inspect-python-package@efb823f52190ad02594531168b7a2d5790e66516 # v2.14.0 publish: - needs: [build-package] + needs: [release, build-package] runs-on: ubuntu-latest environment: release permissions: @@ -80,11 +81,11 @@ jobs: uses: pypa/gh-action-pypi-publish@ed0c53931b1dc9bd32cbe73a98c7f6766f8a527e # v1.13.0 with: repository-url: https://test.pypi.org/legacy/ - skip-existing: ${{ inputs.dry_run }} - verbose: ${{ inputs.dry_run }} + skip-existing: ${{ needs.release.outputs.dry_run }} + verbose: ${{ needs.release.outputs.dry_run }} - name: Upload package to PyPI - if: ${{ !inputs.dry_run }} + if: ${{ !needs.release.outputs.dry_run }} uses: pypa/gh-action-pypi-publish@ed0c53931b1dc9bd32cbe73a98c7f6766f8a527e # v1.13.0 with: attestations: false