diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index bf9177d..d47cb79 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -56,26 +56,36 @@ jobs: with: path: dist/*.tar.gz - upload_pypi: - needs: [wheel, sdist] + upload_test_pypi: + needs: [sdist, wheel] runs-on: ubuntu-latest + environment: release + permissions: + id-token: write if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') steps: - name: Download build artifacts uses: actions/download-artifact@v3 with: - name: artifact path: dist - name: Publish to Test PyPI uses: pypa/gh-action-pypi-publish@release/v1 with: - user: __token__ - password: ${{ secrets.TEST_PYPI_TOKEN }} repository-url: https://test.pypi.org/legacy/ + upload_pypi: + needs: [sdist, wheel, upload_test_pypi] + runs-on: ubuntu-latest + environment: release + permissions: + id-token: write + if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') + steps: + - name: Download build artifacts + uses: actions/download-artifact@v3 + with: + path: dist + - name: Publish to PyPI uses: pypa/gh-action-pypi-publish@release/v1 - with: - user: __token__ - password: ${{ secrets.PYPI_TOKEN }}