Skip to content

Commit 90cfe88

Browse files
committed
publish to test.pypi
1 parent 0213361 commit 90cfe88

1 file changed

Lines changed: 22 additions & 2 deletions

File tree

‎.github/workflows/release.yml‎

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,11 @@ jobs:
3434
name: dist
3535
path: dist/
3636

37-
publish:
37+
publish-pypi:
3838
name: Publish to PyPI
3939
needs: build
4040
runs-on: ubuntu-latest
41-
if: startsWith(github.ref, 'refs/tags/')
41+
if: startsWith(github.ref, 'refs/tags/') && !contains(github.ref, '-rc')
4242
environment: pypi
4343
permissions:
4444
id-token: write
@@ -51,3 +51,23 @@ jobs:
5151

5252
- name: Publish to PyPI
5353
uses: pypa/gh-action-pypi-publish@release/v1
54+
55+
publish-testpypi:
56+
name: Publish to TestPyPI
57+
needs: build
58+
runs-on: ubuntu-latest
59+
if: startsWith(github.ref, 'refs/tags/') && contains(github.ref, '-rc')
60+
environment: testpypi
61+
permissions:
62+
id-token: write
63+
steps:
64+
- name: Download distributions
65+
uses: actions/download-artifact@v4
66+
with:
67+
name: dist
68+
path: dist/
69+
70+
- name: Publish to TestPyPI
71+
uses: pypa/gh-action-pypi-publish@release/v1
72+
with:
73+
repository-url: https://test.pypi.org/legacy/

0 commit comments

Comments
 (0)