From df0ce40787a9a09b6e19c19fa21cd563b5186b41 Mon Sep 17 00:00:00 2001 From: Agustin Borgna Date: Tue, 2 Apr 2024 17:37:57 +0100 Subject: [PATCH] Always try pushing to pypy test --- .github/workflows/python-wheels.yml | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/.github/workflows/python-wheels.yml b/.github/workflows/python-wheels.yml index 118473db6..3d0827855 100644 --- a/.github/workflows/python-wheels.yml +++ b/.github/workflows/python-wheels.yml @@ -44,7 +44,6 @@ jobs: environment: pypi permissions: id-token: write - if: github.event_name == 'push' && github.ref_type == 'tag' strategy: matrix: package: @@ -61,8 +60,17 @@ jobs: path: dist merge-multiple: true - - uses: pypa/gh-action-pypi-publish@release/v1 - if: startsWith(github.ref, 'refs/tags/${{ matrix.package }}-v') + - name: Publish to test instance of PyPI + uses: pypa/gh-action-pypi-publish@release/v1 + if: github.event_name != 'push' || github.ref_type != 'tag' || + not(startsWith(github.ref, 'refs/tags/${{ matrix.package }}-v')) with: - # TODO: Using a test endpoint repository-url: https://test.pypi.org/legacy/ + + - name: Publish to PyPI + uses: pypa/gh-action-pypi-publish@release/v1 + if: github.event_name == 'push' && github.ref_type == 'tag' && + startsWith(github.ref, 'refs/tags/${{ matrix.package }}-v') + with: + # TODO: Use the real PyPI URL + repository-url: https://test.pypi.org/legacy/