Skip to content

Commit 6f547fe

Browse files
committed
update version check workflow to include uv.lock
Signed-off-by: lelia <2418071+lelia@users.noreply.github.com>
1 parent fd926e9 commit 6f547fe

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

.github/workflows/version-check.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ on:
66
- 'socketsecurity/**'
77
- 'setup.py'
88
- 'pyproject.toml'
9+
- 'uv.lock'
910

1011
permissions:
1112
contents: read
@@ -46,6 +47,18 @@ jobs:
4647
print(f'✅ Version properly incremented from {main_ver} to {pr_ver}')
4748
"
4849
50+
- name: Require uv.lock update when pyproject changes
51+
run: |
52+
CHANGED_FILES="$(git diff --name-only origin/main...HEAD)"
53+
54+
if echo "$CHANGED_FILES" | grep -qx 'pyproject.toml'; then
55+
if ! echo "$CHANGED_FILES" | grep -qx 'uv.lock'; then
56+
echo "❌ pyproject.toml changed, but uv.lock was not updated."
57+
echo "Run 'uv lock' and commit uv.lock with the version bump."
58+
exit 1
59+
fi
60+
fi
61+
4962
- name: Manage PR Comment
5063
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea
5164
if: always() && github.event.pull_request.head.repo.full_name == github.repository

0 commit comments

Comments
 (0)