chore: add version consistency check in CI and bump plugin.yaml to v0.9.2 - #30
Conversation
….9.2 - Add 'Check version consistency' step to build-and-test job: verifies pyproject.toml [project].version and hexus/plugin.yaml version both match the git tag version (stripping the 'v' prefix) before Docker/PyPI artifacts are built. - Bump hexus/plugin.yaml version from 0.4.0 to 0.9.2 to match pyproject.toml and the v0.9.2 tag. Closes: ensures Docker image is only pushed to GHCR when all version fields are in sync with the tag.
| - name: Checkout repository | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Check version consistency |
There was a problem hiding this comment.
CRITICAL: Version consistency check runs unconditionally, breaking CI on all non-tag builds
This step uses GITHUB_REF_NAME as the expected version but has no if guard. On pull requests, GITHUB_REF_NAME is something like 30/merge; on pushes to main, it is main. Neither will match the 0.9.2 in pyproject.toml, so the step will always fail except on tag pushes. The Docker login/push steps below (lines 147, 155) correctly gate on startsWith(github.ref, 'refs/tags/v') but this check is missing that guard.
| - name: Check version consistency | |
| - name: Check version consistency | |
| if: startsWith(github.ref, 'refs/tags/v') |
Reply with @kilocode-bot fix it to have Kilo Code address this issue.
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Files Reviewed (1 file)
Previous Review Summary (commit a02cdb3)Current summary above is authoritative. Previous snapshots are kept for context only. Previous review (commit a02cdb3)Status: 1 Issue Found | Recommendation: Address before merge Overview
Issue Details (click to expand)CRITICAL
Files Reviewed (2 files)
Reviewed by deepseek-v4-pro · Input: 31K · Output: 4K · Cached: 142.3K |
The check was running on every PR push where GITHUB_REF_NAME is the branch ref (e.g. '30/merge'), causing a false failure. Gate it with startsWith(github.ref, 'refs/tags/v') so it only runs on version tag pushes, not PRs or branch pushes.
Build failure: root causeThe Fix applied:
- name: Check version consistency
+ name: Check version consistency
+ if: startsWith(github.ref, 'refs/tags/v') # only runs on tag pushes, not PRs
run: |Rebuild: #30 |
Summary
CI version consistency check
Added a new
Check version consistencystep to thebuild-and-testjob in.github/workflows/ci.yml. It runs before Docker and PyPI artifacts are built, verifying that:pyproject.toml[project].versionmatches the git tag versionhexus/plugin.yamlversionmatches the git tag versionThe
vprefix is stripped from the tag sov0.9.2compares cleanly against0.9.2in the files.This prevents the Docker image from being tagged/pushed to GHCR when version fields drift (e.g. a bare
0.9.2tag with mismatched files).Bump plugin.yaml
Updated
hexus/plugin.yamlversion: 0.4.0→0.9.2to matchpyproject.tomland thev0.9.2tag.Files changed
.github/workflows/ci.ymlCheck version consistencystep inbuild-and-testhexus/plugin.yamlversion: 0.4.0→0.9.2Checklist
needs: build-and-test)