From 899d65ef7d9b71e51f962a1b5256505d6d0671c1 Mon Sep 17 00:00:00 2001 From: Agustin Borgna Date: Fri, 7 Jun 2024 14:08:39 +0100 Subject: [PATCH] ci: Fix release wheels if condition --- .github/workflows/python-wheels.yml | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/.github/workflows/python-wheels.yml b/.github/workflows/python-wheels.yml index e218a6cc7..973855c58 100644 --- a/.github/workflows/python-wheels.yml +++ b/.github/workflows/python-wheels.yml @@ -127,12 +127,18 @@ jobs: release: name: Release runs-on: ubuntu-latest - if: | - ${{ (github.event_name == 'release' && github.ref_type == 'tag' && startsWith(github.ref, 'refs/tags/tket2-py-v'))}} || - ${{ (github.event_name == 'workflow_dispatch' && github.ref_type == 'tag' && startsWith(github.ref, 'refs/tags/tket2-py-v'))}} || + if: ${{ (github.event_name == 'release' && github.ref_type == 'tag' && startsWith(github.ref, 'refs/tags/tket2-py-v') ) || (github.event_name == 'workflow_dispatch' && github.ref_type == 'tag' && startsWith(github.ref, 'refs/tags/tket2-py-v') ) }} needs: [linux, windows, macos, sdist] steps: - uses: actions/download-artifact@v4 + - name: Debug info + run: | + echo "Event: ${{ github.event_name }}" + echo "Ref: ${{ github.ref }}" + echo "Ref type: ${{ github.ref_type }}" + echo "Is release: ${{ (github.event_name == 'release' && github.ref_type == 'tag' && startsWith(github.ref, 'refs/tags/tket2-py-v') ) }}" + echo "Is workflow_dispatch: ${{ (github.event_name == 'workflow_dispatch' && github.ref_type == 'tag' && startsWith(github.ref, 'refs/tags/tket2-py-v') ) }}" + echo "Full expression: ${{ (github.event_name == 'release' && github.ref_type == 'tag' && startsWith(github.ref, 'refs/tags/tket2-py-v') ) || (github.event_name == 'workflow_dispatch' && github.ref_type == 'tag' && startsWith(github.ref, 'refs/tags/tket2-py-v') ) }}" - name: Publish to PyPI uses: PyO3/maturin-action@v1 env: