update publishing workflow #1002
Merged
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.
This is a re-submission of #1000, after updating the default branch of the project from
develop
tomain
, due to #980 .Original content follows.
The recent release of
v1.1.1
has failed to upload to PyPI, due to issues with the credentials we're using.Rather than replace the existing credentials with an API token, it seemed like a good opportunity to revisit our publishing workflow and use the new OIDC support for publishing to PyPI.
I have:
pypi-publishing
for running the workflow; it limits the branch that it can run against and has some additional restrictions which we can tweak in the future.This PR changes the publishing workflow in the following ways:
build
job is responsible for publishing the package itself; it has access only to the repository contents and it produces a build artifactasset
job is new; it downloads the artifact and adds it as a release asset, that way our package is directly downloadable from the releases page (this is a nice-to-have)publish
job downloads the artifact, and then publishes it to PyPI. It has no access to repository contents and it runs in the dedicated publish environmentpoetry
is no longer used to publish the artifact, in favor of using the official PyPI github action which directly supports the OIDC integration nicelyTesting note
This workflow is triggered on release publishing, and as a result, it cannot be tested in this PR.