Skip to content

Commit 8efea33

Browse files
author
Claude Subagent
committed
fix: Use OIDC authentication matching production PyPI workflow
- Changed from API token to OIDC (OpenID Connect) authentication - Matches pattern used in releases.yml for production PyPI - Uses environment-based trusted authentication - Simplifies setup and improves security
1 parent b93e3cd commit 8efea33

File tree

1 file changed

+23
-4
lines changed

1 file changed

+23
-4
lines changed

.github/workflows/testpypi.yml

Lines changed: 23 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,34 @@ jobs:
2424
- name: Check distributions
2525
run: twine check dist/*
2626

27+
- name: Upload artifacts
28+
uses: actions/upload-artifact@v4
29+
with:
30+
name: testpypi-dist
31+
path: dist/
32+
retention-days: 1
33+
34+
publish-testpypi:
35+
needs: build
36+
runs-on: ubuntu-latest
37+
environment:
38+
name: testpypi
39+
url: https://test.pypi.org/p/zarr
40+
permissions:
41+
id-token: write
42+
steps:
43+
- uses: actions/download-artifact@v4
44+
with:
45+
name: testpypi-dist
46+
path: dist
47+
2748
- name: Publish to TestPyPI
28-
uses: pypa/gh-action-pypi-publish@release/v1
49+
uses: pypa/gh-action-pypi-publish@v1.13.0
2950
with:
3051
repository-url: https://test.pypi.org/legacy/
31-
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
32-
skip_existing: true
3352

3453
test-install:
35-
needs: build
54+
needs: publish-testpypi
3655
runs-on: ubuntu-latest
3756
strategy:
3857
matrix:

0 commit comments

Comments
 (0)