update publishing workflow #1000
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.
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, nor can it be tested when this PR is merged to
develop
. I will have to rebase the merged changes intomain
before I can try it.This is not an ideal situation. Changes to this workflow may require several rounds of iteration, but I don't want to put up a PR directly to
main
due to some difficulty with our current release workflow:There may be more PRs after this to continue this work.