From f9ecbae6a487e35eee4f5ae23f91016295272240 Mon Sep 17 00:00:00 2001 From: BillTheMaker Date: Sat, 6 Dec 2025 19:30:14 -0700 Subject: [PATCH] Refactor publish workflow for PyPI --- .github/workflows/publish.yml | 48 +++++++++++++++++------------------ 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 4ed4279..fd1705a 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -48,31 +48,31 @@ jobs: name: wheels-${{ matrix.os }}-${{ matrix.target }} path: dist - publish: - name: Publish to PyPI - needs: [build_wheels] - runs-on: ubuntu-latest - if: startsWith(github.ref, 'refs/tags/') || github.event_name == 'workflow_dispatch' + publish: + name: Publish to PyPI + needs: [build_wheels] + runs-on: ubuntu-latest + # REMOVED problematic if condition - steps: - - name: Install maturin for upload - run: pip install maturin + steps: + - name: Install maturin for upload + run: pip install maturin - - name: Download ALL wheels - uses: actions/download-artifact@v4 - with: - path: dist + - name: Download ALL wheels + uses: actions/download-artifact@v4 + with: + path: dist - - name: Flatten wheels to dist/ - run: | - find dist -name "*.whl" -exec cp {} dist/ \; - echo "Wheels ready:" - ls -la dist/*.whl + - name: Flatten wheels to dist/ + run: | + find dist -name "*.whl" -exec cp {} dist/ \; + echo "Wheels ready:" + ls -la dist/*.whl - - name: Publish to PyPI - env: - PYPI_TOKEN: ${{ secrets.PYPI_API_TOKEN }} # ← FIXED: env var - run: | - cd dist - ls -la *.whl - maturin upload --skip-existing --non-interactive # ← No --token + - name: Publish to PyPI + env: + PYPI_TOKEN: ${{ secrets.PYPI_API_TOKEN }} + run: | + cd dist + ls -la *.whl + maturin upload --skip-existing --non-interactive