Skip to content

Commit 511dcb9

Browse files
Wentai Zhangsisyphus-dev-ai
andcommitted
ci(release): auto-sync uv.lock on release-please PR
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
1 parent d1cb336 commit 511dcb9

2 files changed

Lines changed: 26 additions & 1 deletion

File tree

.github/workflows/release.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,31 @@ jobs:
2121
config-file: release-please-config.json
2222
manifest-file: .release-please-manifest.json
2323

24+
# Keep uv.lock in sync after release-please bumps pyproject.toml
25+
- uses: actions/checkout@v4
26+
if: ${{ !steps.release.outputs.release_created }}
27+
with:
28+
ref: release-please--branches--main
29+
id: checkout-pr
30+
continue-on-error: true
31+
32+
- uses: astral-sh/setup-uv@v6
33+
if: ${{ steps.checkout-pr.outcome == 'success' }}
34+
35+
- name: Sync uv.lock
36+
if: ${{ steps.checkout-pr.outcome == 'success' }}
37+
run: |
38+
uv sync
39+
if git diff --quiet uv.lock; then
40+
echo "uv.lock already in sync"
41+
exit 0
42+
fi
43+
git config user.name "github-actions[bot]"
44+
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
45+
git add uv.lock
46+
git commit -m "chore: sync uv.lock"
47+
git push
48+
2449
publish:
2550
needs: release-please
2651
if: ${{ needs.release-please.outputs.release_created }}

AGENTS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ uvx ruff format .
146146
## CI Pipelines
147147

148148
- **CI** (`.github/workflows/ci.yml`): Runs on push/PR to main. Lint with ruff, test on Python 3.10/3.12/3.13.
149-
- **Release** (`.github/workflows/release.yml`): Triggered by `v*` tags. Builds, publishes to PyPI, creates GitHub Release.
149+
- **Release** (`.github/workflows/release.yml`): Runs on push to main. Release-please manages version PRs and auto-syncs `uv.lock`; on merge, publishes to PyPI and creates GitHub Release.
150150

151151
## Code Style
152152

0 commit comments

Comments
 (0)