CI: Allow PyPI publishing to be done manually #31
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.
We have occassionally gotten transient GitHub Action failures that seem to be due to GitHub’s infrastructure, rather than our own workflows. In the case of creating a new GitHub release, this may result in a failure to upload the build wheels to PyPI. For that reason, it is useful to be able to dispatch a PyPI upload manually, without creating a new GitHub release. This patch enables the
workflow_dispatch
trigger for ourwheels
, and explicitly allowsupload_pypi
to run onworkflow_dispatch
, which allows us to manually and intentionally call this workflow without making a new release.We want this to be run intentionally, though, so it’s important to note that to trigger a
workflow_dispatch
event, the workflow has to be onmain
. This means we cannot publish from a branch or PR that has not yet been merged. Because the primary use case of this is to try publishing a PyPI upload again after a transient failure due to GitHub’s infrastructure, this restriction is useful.This patch was originally part of PR #30, but separating it out for its own review is important. Adding this infrastructure will give us a hook to update our GitHub docs without making a new release.