Skip to content

Conversation

@jkebinger
Copy link
Collaborator

Summary

Optimize the publish workflow by checking if the current version already exists on PyPI before running expensive build and test steps.

Changes

  • Added early version check step that queries PyPI API for sdk-reforge package
  • Skips poetry install, dependency installation, tests, build, and publish steps if version already exists
  • Uses $GITHUB_OUTPUT to communicate skip status between steps
  • All expensive steps now have if: steps.version-check.outputs.skip == 'false' conditions

Benefits

  • Prevents unnecessary CI resource usage when the same version is pushed multiple times
  • Avoids potential publish conflicts or errors
  • Provides clear logging about whether version exists or not
  • Workflow completes in seconds instead of minutes when version already published

🤖 Generated with Claude Code

Added early version check that queries PyPI API to see if current version
already exists. If so, skips all expensive steps (poetry install, tests,
build) and exits early.

This prevents unnecessary CI runs and potential publish conflicts when
the same version is pushed multiple times to main.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
Copy link
Contributor

@jdwyah jdwyah left a comment

Choose a reason for hiding this comment

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

thanks

@jkebinger jkebinger merged commit 7716a08 into main Sep 24, 2025
7 checks passed
@jkebinger jkebinger deleted the skip-if-published branch September 24, 2025 18:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants