@@ -116,30 +116,20 @@ jobs:
116116
117117 - name : Build sdist
118118 run : |
119- python -m pip install -U build twine setuptools
120- python -m build --sdist
119+ .github/scripts/ci_release_build_sdist.sh
121120
122121 - name : Check dist
123122 run : |
124- ls -ahl dist
125- pkg=$(ls -t dist/*.tar.gz | head -n 1 | xargs basename)
126- echo "PKG_NAME=$pkg" >> "$GITHUB_ENV"
127- twine check "dist/$pkg"
123+ .github/scripts/ci_release_check_dist.sh
128124
129125 - name : test installation
130126 run : |
131- uv venv local_uv_env
132- source local_uv_env/bin/activate
133- uv pip install "dist/${{ env.PKG_NAME }}" torch
127+ .github/scripts/ci_release_test_install.sh "${{ env.PKG_NAME }}"
134128
135129 - name : Upload to local
136130 continue-on-error : true
137131 run : |
138- sha256sum "dist/${{ env.PKG_NAME }}"
139- DIR=/opt/dist/${{ needs.check-vm.outputs.run_id }}
140- [ -d "$DIR" ] || mkdir -p "$DIR"
141- cp "dist/${{ env.PKG_NAME }}" "$DIR/"
142- echo "UPLOADED=1" >> "$GITHUB_ENV"
132+ .github/scripts/ci_release_upload_local.sh "${{ env.PKG_NAME }}" "${{ needs.check-vm.outputs.run_id }}"
143133
144134 - name : Upload to artifact
145135 uses : actions/upload-artifact@v7
@@ -160,22 +150,7 @@ jobs:
160150 - name : Waiting for confirmation
161151 if : (github.event_name == 'release' || github.event.inputs.upload_pypi == 'true') && !cancelled()
162152 run : |
163- timestamp=$(date +%s%3N)
164- echo "open http://${RUNNER}/gpu/ci/confirm?id=${{ github.run_id }}×tamp=$timestamp&confirmed=1 to confirm releasing to pypi"
165- for i in {1..5}; do echo "."; done
166- echo "click http://${RUNNER}/gpu/ci/confirm?id=${{ github.run_id }}×tamp=$timestamp&denied=1 to DENY"
167- status=-1
168- while [ "$status" -lt 0 ]; do
169- status=$(curl -s "http://${RUNNER}/gpu/ci/confirm?id=${{ github.run_id }}×tamp=$timestamp")
170- if [ "$status" == "2" ]; then
171- echo "PYPI_RELEASE_CONFIRMATION=$status" >> "$GITHUB_ENV"
172- elif [ "$status" -lt 0 ]; then
173- sleep 5
174- else
175- echo "release has been confirmed"
176- echo "PYPI_RELEASE_CONFIRMATION=$status" >> "$GITHUB_ENV"
177- fi
178- done
153+ .github/scripts/ci_release_wait_for_confirmation.sh manual
179154
180155 - name : Upload sdist to pypi
181156 if : (github.event_name == 'release' || github.event.inputs.upload_pypi == 'true') && env.PYPI_RELEASE_CONFIRMATION == '1' && !cancelled()
@@ -204,20 +179,13 @@ jobs:
204179 python-version : ' 3.14'
205180 cache : ' pip'
206181
207- - name : Install requirements
208- run : |
209- python -m pip install -U build twine setuptools
210-
211182 - name : Build sdist
212183 run : |
213- python -m build --sdist
184+ .github/scripts/ci_release_build_sdist.sh
214185
215186 - name : Check dist
216187 run : |
217- ls -ahl dist
218- pkg=$(ls -t dist/*.tar.gz | head -n 1 | xargs basename)
219- echo "PKG_NAME=$pkg" >> "$GITHUB_ENV"
220- twine check "dist/$pkg"
188+ .github/scripts/ci_release_check_dist.sh
221189
222190 - name : Upload to artifact
223191 uses : actions/upload-artifact@v7
@@ -237,7 +205,7 @@ jobs:
237205 - name : Waiting for confirmation
238206 if : (github.event_name == 'release' || github.event.inputs.upload_pypi == 'true') && !cancelled()
239207 run : |
240- for i in {1..5}; do sleep 5; done
208+ .github/scripts/ci_release_wait_for_confirmation.sh sleep
241209
242210 - name : Upload sdist to pypi
243211 if : (github.event_name == 'release' || github.event.inputs.upload_pypi == 'true') && !cancelled()
0 commit comments