Add version ordering check and dry-run mode to publish workflow

The publish workflow had no guard against publishing a version that is equal to or older than the current PyPI release, and no safe way to test the workflow end-to-end without actually publishing.

Changes

publish.yml

  • Version ordering check — new step inserted between format validation and pyproject.toml update; queries the PyPI JSON API and uses packaging.version.Version (PEP 440-aware) to reject any input that is not strictly greater than the current release. Gracefully skips the check on first publish (HTTP 404).
  • dry_run input — optional boolean (default false). When true, all validation and build steps run normally but the Publish to PyPI and Create release tag steps are skipped, making it safe to exercise the full workflow without side-effects.

CONTRIBUTING.md (new)

  • Step-by-step instructions for triggering the workflow via the GitHub UI and the GitHub CLI
  • Table showing which steps run in dry-run vs. real-release mode
  • Version ordering rule examples for quick reference

Version ordering behaviour

Input (current latest: 1.0.0) Result
1.0.1 / 2.0.0 Allowed
1.0.0 Rejected — same version
0.9.9 Rejected — older version

Quickly spin up Copilot coding agent tasks from anywhere on your macOS or Windows machine with Raycast.

Merge request reports

Loading