Skip to content

Refactor release workflow: version-driven automation with full test gating - #70

Open
spillai wants to merge 4 commits into
mainfrom
claude/update-pypi-release-YArz4
Open

Refactor release workflow: version-driven automation with full test gating#70
spillai wants to merge 4 commits into
mainfrom
claude/update-pypi-release-YArz4

Conversation

@spillai

@spillai spillai commented Apr 15, 2026

Copy link
Copy Markdown
Collaborator

Summary

Restructured the release pipeline to be driven by version changes in pyproject.toml rather than git tags, with comprehensive testing as a pre-release gate. The workflow now automatically detects version bumps, runs the full test suite, creates tags, builds wheels, and publishes to PyPI in a single coordinated flow. Benchmarks are decoupled into an independent workflow that doesn't gate releases.

Key Changes

  • Version-driven triggers: Changed from tag-based (on: push.tags) to file-based (on: push.paths: pyproject.toml) detection. The check-version job extracts the current version and compares it to the previous commit to determine if a release should proceed.

  • Full test gating: Added test-full job that runs the complete Python test suite (fast + slow + integration) before any release artifacts are created. This ensures only validated code reaches PyPI.

  • Automated tagging: Introduced tag job that creates and pushes git tags after tests pass, eliminating the separate auto-tag.yml workflow. Tags are created from the detected version with proper idempotency checks.

  • Unified job dependencies: Restructured all downstream jobs (build, publish, create-release, deploy-*) to depend on check-version with conditional execution (if: needs.check-version.outputs.changed == 'true'), ensuring consistent version handling across the pipeline.

  • Benchmark workflow separation: Extracted benchmark execution into a new benchmark.yml workflow that runs independently on version changes but does NOT gate releases. This prevents long-running benchmarks from blocking PyPI publication.

  • Improved changelog generation: Enhanced the release notes script to include commit hashes, previous tag detection, and a GitHub compare link.

  • Explicit version checkouts: Added ref: v${{ needs.check-version.outputs.version }} to build and publish steps to ensure they operate on the tagged commit.

  • Manual dispatch support: Workflow can be triggered manually via workflow_dispatch to force a release regardless of version change detection.

Implementation Details

  • Version extraction uses regex parsing of pyproject.toml for robustness
  • Concurrency set to cancel-in-progress: false to prevent interrupting in-flight releases
  • Removed Windows ARM64 build (commented out) from the build matrix
  • Updated Slack notification to reflect actual supported platforms (removed Windows arm64)
  • All conditional logic gates on the changed output from check-version, providing a single source of truth for release decisions

https://claude.ai/code/session_01SP2z7H9cBH2oaRPodFfcPG


Open with Devin

claude added 2 commits April 15, 2026 20:53
Mirror vlm-run/vlmrun-python-sdk's release pattern so a single push to
main with a bumped pyproject.toml version drives the full release:

* check-version detects the bump and skips when the tag already exists
* test-full runs `make test-python-full` (fast+slow+integration) as a gate
* benchmark runs `cargo bench --workspace` to catch perf regressions
* tag creates and pushes `v<version>` only after both gates pass
* build / publish / create-release / deploy-* key off check-version so
  nothing ships when the version is unchanged
* create-release now generates a compare-link changelog against the
  previous tag and attaches the built wheels

auto-tag.yml is absorbed into the new flow. ci.yml's test-python-full
job is scoped to pull_request events since post-merge gating now lives
in publish.yml.
Benchmarks should observe perf, not gate releases. Move the post-merge
bench run out of publish.yml (and out of ci.yml's benchmark-pages job)
into a dedicated benchmark.yml that triggers on the same version-bump
push as publish.yml but runs fully independently.

* publish.yml: drop the benchmark job and its dependency from `tag`
* benchmark.yml (new): runs cargo bench on version-bump pushes, extracts
  Criterion JSON, and publishes history to GitHub Pages via
  benchmark-action/github-action-benchmark
* ci.yml: drop benchmark-pages (moved to benchmark.yml); PR-side
  benchmark comment job stays put
@gemini-code-assist

Copy link
Copy Markdown

Note

Gemini is unable to generate a review for this pull request due to the file types involved not being currently supported.

devin-ai-integration[bot]

This comment was marked as resolved.

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.

2 participants