File tree Expand file tree Collapse file tree 1 file changed +19
-3
lines changed Expand file tree Collapse file tree 1 file changed +19
-3
lines changed Original file line number Diff line number Diff line change @@ -74,13 +74,15 @@ jobs:
7474 name : cibw-sdist
7575 path : dist/*.tar.gz
7676
77- upload_pypi :
77+ upload_test_pypi :
7878 needs : [build_wheels, build_sdist]
7979 runs-on : ubuntu-latest
80- environment : pypi
80+ environment : test- pypi
8181 permissions :
8282 id-token : write
83- if : github.event_name == 'release' && github.event.action == 'published'
83+ if : |
84+ (github.event_name == 'release' && github.event.action == 'published') ||
85+ (github.event_name == 'push' && github.ref == 'refs/heads/main')
8486 steps :
8587 - uses : actions/download-artifact@v4
8688 with :
9597 uses : pypa/gh-action-pypi-publish@release/v1
9698 with :
9799 repository-url : https://test.pypi.org/legacy/
100+
101+ upload_pypi :
102+ needs : [build_wheels, build_sdist, upload_test_pypi]
103+ runs-on : ubuntu-latest
104+ environment : pypi
105+ permissions :
106+ id-token : write
107+ if : github.event_name == 'release' && github.event.action == 'published'
108+ steps :
109+ - uses : actions/download-artifact@v4
110+ with :
111+ pattern : cibw-*
112+ path : dist
113+ merge-multiple : true
98114 - name : Publish package distribution to PyPI
99115 uses : pypa/gh-action-pypi-publish@release/v1
100116
You can’t perform that action at this time.
0 commit comments