Skip to content

fix(ci): fix PyPI publish action input and enable skip-existing - #31

Merged
whoisjayd merged 1 commit into
mainfrom
fix/release-pypi-skip-existing
Sep 11, 2026
Merged

fix(ci): fix PyPI publish action input and enable skip-existing#31
whoisjayd merged 1 commit into
mainfrom
fix/release-pypi-skip-existing

Conversation

@whoisjayd

@whoisjayd whoisjayd commented Sep 11, 2026

Copy link
Copy Markdown
Owner

What changed / why

  • Change: In .github/workflows/release.yml, update pypa/gh-action-pypi-publish input from username to user: __token__ and set skip-existing: true.
  • Why: username is an invalid input in gh-action-pypi-publish@release/v1 that generated workflow warnings, and skip-existing: true prevents 400 Bad Request errors when re-publishing or re-running a release whose artifacts are already on PyPI.

AI assistance disclosure

  • AI assistance was used and disclosed; the ai-assisted label should be applied.
  • Tools and use: Targeted fix for GitHub Actions PyPI publishing action parameters.
  • Accountable human: Jaydeep Solanki (@whoisjayd).

Summary by Sourcery

Fix the release workflow so PyPI publishing succeeds without invalid-input warnings or failures when artifacts have already been uploaded.

Bug Fixes:

  • Correct the PyPI publishing action input and allow release reruns to skip artifacts that already exist on PyPI.

CI:

  • Update the release workflow’s PyPI publishing configuration to use the supported token username input and enable existing-artifact skipping.

@whoisjayd whoisjayd added the ai-assisted Disclosed AI assistance; requires careful accountable human review label Sep 11, 2026
@coderabbitai

coderabbitai Bot commented Sep 11, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Advanced

Run ID: de180f11-7676-409a-afb7-9d1650a0b783


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@sourcery-ai

sourcery-ai Bot commented Sep 11, 2026

Copy link
Copy Markdown
Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

The release workflow now uses the supported PyPI token username input and skips artifacts that already exist, preventing workflow warnings and re-publish failures during release retries.

File-Level Changes

Change Details Files
Correct the PyPI publishing action inputs and make artifact uploads idempotent.
  • Replace the unsupported username input with user: __token__.
  • Enable skip-existing to avoid failures when published artifacts are uploaded again.
.github/workflows/release.yml

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - I've reviewed your changes and they look great!

Sourcery assessment

Needs a human reviewer. If the corrected publish input or skip-existing behavior is wrong, the workflow could publish or accept an incorrect package state in PyPI that remains after reverting the workflow. The impact is bounded and can generally be mitigated by yanking the release and rerunning the publication, but consumers may already have downloaded the package.


Sourcery is free for open source - if you like our reviews please consider sharing them ✨

@whoisjayd
whoisjayd merged commit 9ad865b into main Sep 11, 2026
22 checks passed
@whoisjayd
whoisjayd deleted the fix/release-pypi-skip-existing branch September 11, 2026 08:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ai-assisted Disclosed AI assistance; requires careful accountable human review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant