Refactor release workflow: version-driven automation with full test gating - #70
Open
spillai wants to merge 4 commits into
Open
Refactor release workflow: version-driven automation with full test gating#70spillai wants to merge 4 commits into
spillai wants to merge 4 commits into
Conversation
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
|
Note Gemini is unable to generate a review for this pull request due to the file types involved not being currently supported. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Restructured the release pipeline to be driven by version changes in
pyproject.tomlrather 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. Thecheck-versionjob extracts the current version and compares it to the previous commit to determine if a release should proceed.Full test gating: Added
test-fulljob 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
tagjob that creates and pushes git tags after tests pass, eliminating the separateauto-tag.ymlworkflow. 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 oncheck-versionwith 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.ymlworkflow 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_dispatchto force a release regardless of version change detection.Implementation Details
pyproject.tomlfor robustnesscancel-in-progress: falseto prevent interrupting in-flight releaseschangedoutput fromcheck-version, providing a single source of truth for release decisionshttps://claude.ai/code/session_01SP2z7H9cBH2oaRPodFfcPG