You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
add a manual backfill trigger to the existing Release Please workflow
build the requested release ref for both test and publish jobs during manual dispatch
remove the separate Publish PyPI workflow because PyPI trusted publishing rejected that workflow identity
Business relevance
This keeps the Python SDK publish identity aligned with the existing PyPI trusted publisher and unblocks publishing the already-created v0.2.0 release.
Validation
git diff --check
parsed workflow YAML locally
observed Publish PyPI workflow rejection from PyPI with workflow_ref .github/workflows/publish-pypi.yml
Review: ci: publish release backfills via release workflow
Nice consolidation. Folding the manual backfill into the release workflow removes a duplicate identity and — importantly — means a manually dispatched ref now passes through the test matrix before publishing, which the standalone publish-pypi.yml skipped entirely. The conditional logic is also handled correctly:
release-please is gated to push so it doesn't run a no-op on dispatch.
test/publish use always() && (...) so they still evaluate when release-please is skipped on dispatch.
The github.event_name == 'workflow_dispatch' && inputs.ref || github.sha ternary is safe here because ref is required: true (can't be empty and silently fall through to github.sha).
A few things worth considering:
Security — arbitrary ref → PyPI (please confirm)
workflow_dispatch accepts any git ref in inputs.ref, and the publish job carries id-token: write against the trusted publisher. That means anyone able to trigger this workflow can build and publish an arbitrary branch/commit to PyPI as layerv-qurl. This isn't a regression (the deleted workflow had the same exposure), but now is a good moment to confirm the pypi environment has required reviewers / a deployment protection rule configured. Without that, the test gate is the only thing standing between an arbitrary ref and a real PyPI release. The environment protection is the right place to enforce this, not the workflow.
Stale hardcoded default
default: v0.2.0 (and the matching description "build and publish") will go stale the moment v0.2.0 ships — a future operator could dispatch and accidentally re-attempt 0.2.0. Since the input is required: true, consider dropping the default (force an explicit choice) rather than pinning it to a one-time backfill value.
No concurrency guard (minor)
There's no concurrency: block, so a push to main that creates a release and a simultaneous manual dispatch could both reach publish. PyPI rejects duplicate file uploads so the blast radius is "one job fails," but a concurrency: { group: publish-${{ inputs.ref || github.sha }} } would make this tidier.
Idempotency on re-run (minor)
If a backfill is dispatched for a version already (even partially) on PyPI, pypa/gh-action-pypi-publish will fail on existing artifacts. Fine for a one-shot backfill; just flagging that re-runs aren't no-ops. skip-existing: true is an option if you want dispatch to be safely repeatable.
Nothing blocking from a code standpoint — the main ask is confirming the pypi environment protection rule, given the arbitrary-ref publish capability.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
Summary
Business relevance
This keeps the Python SDK publish identity aligned with the existing PyPI trusted publisher and unblocks publishing the already-created v0.2.0 release.
Validation