Skip to content

Commit 456679d

Browse files
committed
CI: Add trusted publishing for TestPyPI
1 parent f8bdf51 commit 456679d

1 file changed

Lines changed: 30 additions & 0 deletions

File tree

.github/workflows/build_wheel.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,3 +89,33 @@ jobs:
8989
with state.State(quiet=False) as p_state:
9090
pass
9191
EOF
92+
93+
deploy-testpypi:
94+
name: Deploy to TestPyPI
95+
if: github.ref == 'refs/heads/develop'
96+
needs: ['build_wheels', 'install_wheels']
97+
environment: 'publish-testpypi'
98+
runs-on: ubuntu-latest
99+
permissions:
100+
id-token: write
101+
102+
steps:
103+
- uses: actions/download-artifact@v4
104+
with:
105+
name: cibw-wheels-ubuntu-latest
106+
path: dist
107+
108+
- uses: actions/download-artifact@v4
109+
with:
110+
name: cibw-wheels-macos-latest
111+
path: dist
112+
113+
- uses: actions/download-artifact@v4
114+
with:
115+
name: cibw-wheels-windows-latest
116+
path: dist
117+
118+
- name: Publish package distributions to PyPI
119+
uses: pypa/gh-action-pypi-publish@release/v1
120+
with:
121+
repository-url: https://test.pypi.org/legacy/

0 commit comments

Comments
 (0)