Skip to content

Commit 315b9ff

Browse files
ci: fix and reinstate publish-test job for Test PyPI uploads
1 parent a964f0e commit 315b9ff

File tree

1 file changed

+20
-1
lines changed

1 file changed

+20
-1
lines changed

.github/workflows/publish.yml

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,28 @@ jobs:
5959
name: dist-packages
6060
path: dist/
6161

62+
publish-test:
63+
needs: build
64+
runs-on: ubuntu-latest
65+
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
66+
67+
steps:
68+
- name: Download build artifacts
69+
uses: actions/download-artifact@v4
70+
with:
71+
name: dist-packages
72+
path: dist/
73+
74+
- name: Publish to Test PyPI
75+
env:
76+
TWINE_USERNAME: __token__
77+
TWINE_PASSWORD: ${{ secrets.TEST_PYPI_API_TOKEN }}
78+
run: |
79+
pip install twine
80+
twine upload --repository testpypi dist/*
6281
6382
publish-prod:
64-
needs: build
83+
needs: [build, publish-test]
6584
runs-on: ubuntu-latest
6685
if: github.event_name == 'release' && github.event.action == 'published'
6786

0 commit comments

Comments
 (0)