From ac487d91f8fed878de9d61dc79aa62b781a41de5 Mon Sep 17 00:00:00 2001 From: Brian Bjarke Jensen Date: Sun, 5 Jul 2026 20:06:35 +0200 Subject: [PATCH 1/2] Sync uv.lock on release to keep CI clean. Run uv lock during version bumps and commit the lockfile in the release workflow. Co-authored-by: Cursor --- .gitea/workflows/release.yml | 12 +++++++++++- README.md | 2 +- scripts/ci/bump-version.sh | 9 ++++++++- 3 files changed, 20 insertions(+), 3 deletions(-) diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml index 7c75ca2..17b8a63 100644 --- a/.gitea/workflows/release.yml +++ b/.gitea/workflows/release.yml @@ -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" diff --git a/README.md b/README.md index a67d668..780473f 100644 --- a/README.md +++ b/README.md @@ -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. diff --git a/scripts/ci/bump-version.sh b/scripts/ci/bump-version.sh index a0aec7a..33f868a 100755 --- a/scripts/ci/bump-version.sh +++ b/scripts/ci/bump-version.sh @@ -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 From 3236f27610023d49de2126669ca5ed5bfbabdec2 Mon Sep 17 00:00:00 2001 From: Brian Bjarke Jensen Date: Sun, 5 Jul 2026 20:19:33 +0200 Subject: [PATCH 2/2] manually updated package version --- uv.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/uv.lock b/uv.lock index 382189f..69e8e00 100644 --- a/uv.lock +++ b/uv.lock @@ -1053,7 +1053,7 @@ wheels = [ [[package]] name = "python-repositories" -version = "0.4.0" +version = "0.4.1" source = { editable = "." } dependencies = [ { name = "python-utils" },