[CI] Set PYPI_TOKEN in build_wheel.yml #1542
Closed
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.
PYPI_TOKEN
is not set in the new nightly wheel script (build_wheel.yml
), so it fails to upload created wheel files to PYPI (https://github.com/pytorch/FBGEMM/actions/runs/3901417835). This PR fixes this issue.Details
We need to use a secret
PYPI_TOKEN
to upload wheel files to PyPI. It needs to be accessed viaenv
(e.g., https://github.com/pytorch/FBGEMM/blob/v0.3.0/.github/workflows/fbgemm_nightly_build.yml#L264-L265).upload_pypi
job in the new nightly script uses a Docker (vialinux_job.yml
). Because I am not 100% sure if we can securely pass thisPYPI_TOKEN
to the Docker container, this PR changesupload_pypi
to use a default GitHub Action runner (ubuntu-latest
) and passPYPI_TOKEN
as the original nightly script does, which is the standard method and therefore should be more secure.