diff --git a/.github/workflows/buildwheels.yml b/.github/workflows/buildwheels.yml index 0bb93b43..3ca0da49 100644 --- a/.github/workflows/buildwheels.yml +++ b/.github/workflows/buildwheels.yml @@ -160,34 +160,6 @@ jobs: - run: twine check --strict dist/* - run: for i in dist/*-manylinux*.whl; do auditwheel show $i; done; - dist_upload: - runs-on: ubuntu-latest - needs: [build_wheels] - environment: pypi - permissions: - id-token: write - steps: - - uses: actions/download-artifact@v4 - with: - pattern: dist-* - merge-multiple: true - path: dist - - if: github.event_name == 'push' && github.ref == 'refs/heads/main' - uses: pypa/gh-action-pypi-publish@release/v1.12 - with: - repository_url: https://test.pypi.org/legacy/ - attestations: false - - run: | - echo "github.event_name:" ${{ github.event_name }} - echo "github.event.action:" ${{ github.event.action }} - echo "github.event.prerelease:" ${{ github.event.prerelease }} - echo "env.GITHUB_REF:" ${{ env.GITHUB_REF }} - echo "env.GITHUB_REF:" ${{ env.GITHUB_REF_NAME }} - - if: github.event_name == 'release' && github.event.prerelease == false - uses: pypa/gh-action-pypi-publish@release/v1.12 - with: - attestations: false - make_sdist: name: Make source distribution runs-on: ubuntu-latest @@ -205,18 +177,35 @@ jobs: name: cibw-sdist path: dist/*.tar.gz - upload_sdist: + dist_upload: + runs-on: ubuntu-latest needs: [build_wheels, make_sdist] environment: pypi permissions: id-token: write - runs-on: ubuntu-latest - if: github.event_name == 'release' && github.event.action == 'published' steps: - uses: actions/download-artifact@v5 with: - pattern: cibw-* + pattern: dist-* + merge-multiple: true path: dist + - uses: actions/download-artifact@v5 + with: + pattern: cibw-* merge-multiple: true - - - uses: pypa/gh-action-pypi-publish@release/v1 + path: dist + - run: | + echo "github.event_name:" ${{ github.event_name }} + echo "github.event.action:" ${{ github.event.action }} + echo "github.event.prerelease:" ${{ github.event.prerelease }} + echo "env.GITHUB_REF:" ${{ env.GITHUB_REF }} + echo "env.GITHUB_REF:" ${{ env.GITHUB_REF_NAME }} + - if: github.event_name == 'push' && github.ref == 'refs/heads/main' + uses: pypa/gh-action-pypi-publish@release/v1.13 + with: + repository_url: https://test.pypi.org/legacy/ + attestations: false + - if: github.event_name == 'release' && github.event.prerelease == false + uses: pypa/gh-action-pypi-publish@release/v1.13 + with: + attestations: false