Skip to content

ci: fix PyPI publish action pin#72

Merged
justin-layerv merged 1 commit into
mainfrom
justin/fix-pypi-publish-action
Jun 6, 2026
Merged

ci: fix PyPI publish action pin#72
justin-layerv merged 1 commit into
mainfrom
justin/fix-pypi-publish-action

Conversation

@justin-layerv

Copy link
Copy Markdown
Collaborator

Summary

  • correct the pinned pypa/gh-action-pypi-publish commit SHA used by Release Please
  • add a manual Publish PyPI workflow so the already-created v0.2.0 release tag can be published after the failed release job

Business relevance

This restores the Python SDK release path and unblocks publishing layerv-qurl v0.2.0 to PyPI for customers/installers.

Validation

  • git diff --check
  • parsed workflow YAML locally
  • verified corrected pypa/gh-action-pypi-publish commit exists via GitHub API
  • earlier release branch validation: ruff check, mypy src/, pytest tests/ -v, python -m build

@claude

claude Bot commented Jun 6, 2026

Copy link
Copy Markdown

Review: ci: fix PyPI publish action pin

Focused, sensible change. The diff does two things — corrects the bad pypa/gh-action-pypi-publish pin and adds a manual backfill workflow to publish the existing v0.2.0 tag. Overall looks good; a few things worth checking before relying on it.

⚠️ Main concern: PyPI Trusted Publishing is configured per workflow filename

The new publish-pypi.yml uses OIDC (id-token: write, environment: pypi, no API token). PyPI's trusted publisher entries are scoped to a specific workflow filename (and optionally environment). The existing publisher was almost certainly registered for release-please.yml. Unless you've added a matching trusted publisher (or a pending publisher) for publish-pypi.yml with the pypi environment on PyPI, the OIDC exchange will be rejected and this manual run will fail — the same class of failure you're trying to recover from.

Action: confirm a Trusted Publisher entry exists on PyPI for publish-pypi.yml before dispatching, or reuse the existing release-please.yml filename for the backfill.

Bugs / correctness

  • SHA correctness (the core fix): I couldn't independently verify the new pin 76f52bc884231f62b9a034ebfe128415bbaabdfc resolves to the v1.12.4 tag (network/API access was blocked in my environment). Since the whole PR hinges on this, please double-check via gh api repos/pypa/gh-action-pypi-publish/git/refs/tags/v1.12.4 that it dereferences to this commit. Worth confirming what produced the original wrong SHA so it doesn't recur.
  • Re-publish failure: if v0.2.0 artifacts already exist on PyPI, the publish step will hard-fail (file already exists). Expected for a one-shot backfill, just be aware re-runs aren't idempotent.

Security

  • publish-pypi.yml builds and publishes from an arbitrary inputs.ref, so anyone with workflow_dispatch permission can publish any ref to PyPI. This is acceptable only if the pypi environment has protection rules (required reviewers / restricted branches). Recommend confirming that's in place.
  • Permissions are correctly minimized (contents: read + id-token: write) and all actions are SHA-pinned with version comments. 👍

Maintainability (minor)

  • This workflow reads as a one-time backfill but lives in the repo permanently. The default: v0.2.0 input will become stale/misleading for any future manual use. Consider either (a) removing it after the backfill, or (b) dropping the hardcoded default and renaming it to a generic "manual publish" tool.
  • Unlike release-please.yml, the manual workflow skips the test matrix before publishing. Fine for re-publishing an already-tested tag, but note there's no guard if it's pointed at an untested ref later.

Test coverage

  • N/A — CI-only change. The PR description's validation (git diff --check, YAML parse, API SHA check) is the right approach for a workflow change.

Nice clean fix — the trusted-publisher filename scoping is the one thing I'd verify before dispatching so the backfill doesn't fail the same way the original did.

@justin-layerv justin-layerv merged commit 3519268 into main Jun 6, 2026
11 checks passed
@justin-layerv justin-layerv deleted the justin/fix-pypi-publish-action branch June 6, 2026 18:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant