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:
74
74
name : cibw-sdist
75
75
path : dist/*.tar.gz
76
76
77
- upload_pypi :
77
+ upload_test_pypi :
78
78
needs : [build_wheels, build_sdist]
79
79
runs-on : ubuntu-latest
80
- environment : pypi
80
+ environment : test- pypi
81
81
permissions :
82
82
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')
84
86
steps :
85
87
- uses : actions/download-artifact@v4
86
88
with :
95
97
uses : pypa/gh-action-pypi-publish@release/v1
96
98
with :
97
99
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
98
114
- name : Publish package distribution to PyPI
99
115
uses : pypa/gh-action-pypi-publish@release/v1
100
116
You can’t perform that action at this time.
0 commit comments