diff --git a/.github/workflows/publish.yml b/.github/workflows/release.yml similarity index 56% rename from .github/workflows/publish.yml rename to .github/workflows/release.yml index 2aa0d80..f1e8de7 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/release.yml @@ -1,4 +1,4 @@ -name: Publish Package +name: Release Package on: [push, pull_request] @@ -37,3 +37,28 @@ jobs: name: release-dists path: dist/ retention-days: 1 + + pypi-publish: + runs-on: ubuntu-latest + + needs: + - release-build + + permissions: + id-token: write + + environment: + name: pypi + url: https://test.pypi.org/p/ipybox + + steps: + - name: Retrieve release distributions + uses: actions/download-artifact@v4 + with: + name: release-dists + path: dist/ + + - name: Publish package distributions to TestPyPI + uses: pypa/gh-action-pypi-publish@release/v1 + with: + repository-url: https://test.pypi.org/legacy/