Skip to content

Commit 6fc138a

Browse files
seperate publishing GH envs
1 parent 15ff6c0 commit 6fc138a

File tree

1 file changed

+18
-4
lines changed

1 file changed

+18
-4
lines changed

.github/workflows/cd.yml

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,14 +58,31 @@ jobs:
5858
# with:
5959
# path: wheelhouse/*.whl
6060

61-
upload_all:
61+
upload_release:
6262
# needs: [build_wheels, make_sdist]
6363
needs: [make_sdist]
6464
environment: release
6565
permissions:
6666
id-token: write
6767
runs-on: ubuntu-latest
6868

69+
steps:
70+
- uses: actions/download-artifact@v4
71+
with:
72+
name: artifact
73+
path: dist
74+
75+
- uses: pypa/gh-action-pypi-publish@release/v1
76+
if: github.event_name == 'release' && github.event.action == 'published'
77+
78+
upload_test:
79+
# needs: [build_wheels, make_sdist]
80+
needs: [make_sdist]
81+
environment: testpypi
82+
permissions:
83+
id-token: write
84+
runs-on: ubuntu-latest
85+
6986
steps:
7087
- uses: actions/download-artifact@v4
7188
with:
@@ -77,6 +94,3 @@ jobs:
7794
# Remember to tell (test-)pypi about this repo before publishing
7895
# Remove this line to publish to PyPI
7996
repository-url: https://test.pypi.org/legacy/
80-
81-
- uses: pypa/gh-action-pypi-publish@release/v1
82-
if: github.event_name == 'release' && github.event.action == 'published'

0 commit comments

Comments
 (0)