diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index c36a8cde..4e68817c 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -98,36 +98,33 @@ jobs: path: dist test_release: - name: Release + name: Test release. + needs: [linux, windows, macos, sdist] runs-on: ubuntu-latest - environment: release - needs: [linux, macos, sdist] - permissions: - id-token: write steps: - - uses: actions/download-artifact@v4 + - uses: actions/download-artifact@v3 + with: + name: wheels + path: dist + - name: Publish distribution 📦 to Test PyPI + uses: pypa/gh-action-pypi-publish@release/v1 with: - pattern: wheels-* - merge-multiple: true - - name: Publish - run: | - pip install maturin - maturin upload --repository testpypi --skip-existing * + password: ${{ secrets.TEST_PYPI_API_TOKEN }} + repository-url: https://test.pypi.org/legacy/ release: name: Release runs-on: ubuntu-latest - environment: release if: "startsWith(github.ref, 'refs/tags/')" needs: [linux, macos, sdist] - permissions: - id-token: write steps: - uses: actions/download-artifact@v3 with: name: wheels - name: Publish to PyPI uses: PyO3/maturin-action@v1 + env: + MATURIN_PYPI_TOKEN: ${{ secrets.PYPI_API_TOKEN }} with: command: upload - args: --non-interactive --skip-existing * + args: --skip-existing *