[misc] Refactor release workflow to upload the wheel artifacts #2186
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Related issue = #2185
I did some cleanup to
python/build.py
. The change is actually not as large as it appears, because I was mostly grouping lots of the global statements into functions. A new mode,build
, is added to this script, which only builds the wheels intopython/dist
, but doesn't do the upload. Also added an option--skip_build
.The release job now becomes:
python build.py build
: builds the wheels without uploading.Archive Wheel Artifacts
: make the wheel files the artifacts of this job. (Unfortunately, I haven't found a way to include the release tag in the artifacts.) In case the final PyPI upload step failed, we still have a way to access these wheels and upload them manually.python build.py try_upload --skip_build
: Try uploading the wheels built from step 1.Tested in https://github.com/k-ye/test_gh_action/pull/10/checks?check_run_id=1879776553
[Click here for the format server]