Sync uv.lock on release to prevent CI failures #24

Merged
brian merged 2 commits from cursor/sync-uv-lock-on-release into main 2026-07-05 20:27:30 +02:00
4 changed files with 21 additions and 4 deletions
+11 -1
View File
@@ -22,6 +22,16 @@ jobs:
COMMIT_MSG: ${{ github.event.head_commit.message }}
run: scripts/ci/parse-merge-commit.sh "$COMMIT_MSG"
- name: Set up Python
if: steps.meta.outputs.bump != 'skip'
uses: actions/setup-python@v5
with:
python-version-file: .python-version
- name: Install uv
if: steps.meta.outputs.bump != 'skip'
run: pip install uv
- name: Bump version
if: steps.meta.outputs.bump != 'skip'
id: bump
@@ -45,7 +55,7 @@ jobs:
run: |
git config user.name "CI Bot"
git config user.email "ci-bot@example.com"
git add pyproject.toml
git add pyproject.toml uv.lock
git commit -m "chore: release v${VERSION} [skip ci]"
git tag "v${VERSION}"
git remote set-url origin "https://x-access-token:${CI_RUNNER_TOKEN}@${GITHUB_SERVER_URL#https://}/${GITHUB_REPOSITORY}.git"
+1 -1
View File
@@ -125,7 +125,7 @@ Releases are automated when a pull request is merged to `main`. CI reads the **m
1. Open a PR targeting `main` (see [`.gitea/PULL_REQUEST_TEMPLATE.md`](.gitea/PULL_REQUEST_TEMPLATE.md)).
2. If the PR changes files under `python_repositories/`, the title **must** start with a version bump prefix (enforced by CI).
3. On merge, [`release.yml`](.gitea/workflows/release.yml) bumps [`pyproject.toml`](pyproject.toml), commits, tags `vX.Y.Z`, creates a Gitea release with auto-generated notes, and pushes the tag.
3. On merge, [`release.yml`](.gitea/workflows/release.yml) bumps [`pyproject.toml`](pyproject.toml) and syncs [`uv.lock`](uv.lock), commits, tags `vX.Y.Z`, creates a Gitea release with auto-generated notes, and pushes the tag.
4. [`publish.yml`](.gitea/workflows/publish.yml) builds and publishes the package to the Gitea Package Registry.
Docs-, CI-, and test-only PRs do not need a prefix and will not trigger a release.
+8 -1
View File
@@ -28,10 +28,17 @@ fi
set_pyproject_version "$VERSION"
if command -v uv >/dev/null 2>&1; then
uv lock
else
echo "uv not found; uv.lock was not updated" >&2
exit 1
fi
if [[ -n "${GITHUB_OUTPUT:-}" ]]; then
echo "version=${VERSION}" >> "$GITHUB_OUTPUT"
else
echo "version=${VERSION}"
fi
echo "Updated pyproject.toml to version ${VERSION}" >&2
echo "Updated pyproject.toml and uv.lock to version ${VERSION}" >&2
Generated
+1 -1
View File
@@ -1053,7 +1053,7 @@ wheels = [
[[package]]
name = "python-repositories"
version = "0.4.0"
version = "0.4.1"
source = { editable = "." }
dependencies = [
{ name = "python-utils" },