Skip to content

Commit e129da7

Browse files
authored
chore(deps): pin sdk dependencies to patch version (#77)
* chore(deps): pin sdk dependencies to patch * chore(ci): use python3.14 in CI * feat(ci): auto-tag when sdk version change merged to main * chore(ci): use actions/checkout@v6
1 parent 45fcedb commit e129da7

5 files changed

Lines changed: 98 additions & 21 deletions

File tree

.github/workflows/ruff.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,25 +9,25 @@ on:
99
jobs:
1010
ruff-check:
1111
runs-on: ubuntu-latest
12-
12+
1313
steps:
14-
- uses: actions/checkout@v4
15-
14+
- uses: actions/checkout@v6
15+
1616
- name: Install uv
1717
uses: astral-sh/setup-uv@v1
1818
with:
1919
version: "latest"
20-
20+
2121
- name: Set up Python
2222
uses: actions/setup-python@v4
2323
with:
2424
python-version: "3.12"
25-
25+
2626
- name: Install dependencies
2727
run: UV_GIT_LFS=1 uv sync --dev
28-
28+
2929
- name: Run ruff linter
3030
run: uv run ruff check --output-format=github .
31-
31+
3232
- name: Run ruff formatter
33-
run: uv run ruff format --check --diff .
33+
run: uv run ruff format --check --diff .

.github/workflows/tag-version.yml

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
name: Tag livekit-agents version
2+
3+
on:
4+
push:
5+
branches: [main]
6+
paths:
7+
- 'pyproject.toml'
8+
9+
permissions:
10+
contents: write
11+
12+
jobs:
13+
tag-version:
14+
runs-on: ubuntu-latest
15+
16+
steps:
17+
- uses: actions/checkout@v6
18+
with:
19+
fetch-depth: 2
20+
fetch-tags: true
21+
22+
- name: Detect livekit-agents version change
23+
id: version
24+
run: |
25+
set -euo pipefail
26+
27+
extract_version() {
28+
local ref="$1"
29+
git show "$ref:pyproject.toml" 2>/dev/null \
30+
| grep -oE '"livekit-agents(\[[^]]*\])?==[^"]+"' \
31+
| head -n1 \
32+
| sed -E 's/.*==([^"]+)"/\1/' \
33+
|| true
34+
}
35+
36+
current=$(extract_version HEAD)
37+
previous=$(extract_version HEAD^ || true)
38+
39+
echo "current=$current"
40+
echo "previous=$previous"
41+
42+
if [ -z "$current" ]; then
43+
echo "No livekit-agents==X.Y.Z pin found in pyproject.toml; skipping."
44+
echo "should_tag=false" >> "$GITHUB_OUTPUT"
45+
exit 0
46+
fi
47+
48+
if [ "$current" = "$previous" ]; then
49+
echo "livekit-agents version unchanged ($current); skipping."
50+
echo "should_tag=false" >> "$GITHUB_OUTPUT"
51+
exit 0
52+
fi
53+
54+
echo "livekit-agents bumped: ${previous:-<none>} -> $current"
55+
echo "should_tag=true" >> "$GITHUB_OUTPUT"
56+
echo "version=$current" >> "$GITHUB_OUTPUT"
57+
58+
- name: Create and push tag
59+
if: steps.version.outputs.should_tag == 'true'
60+
run: |
61+
set -euo pipefail
62+
tag="v${{ steps.version.outputs.version }}"
63+
64+
if git rev-parse --verify "refs/tags/$tag" >/dev/null 2>&1; then
65+
existing=$(git rev-list -n1 "$tag")
66+
if [ "$existing" = "$GITHUB_SHA" ]; then
67+
echo "Tag $tag already points at $GITHUB_SHA; nothing to do."
68+
exit 0
69+
fi
70+
echo "Error: tag $tag already exists on a different commit ($existing)."
71+
exit 1
72+
fi
73+
74+
git config user.name "github-actions[bot]"
75+
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
76+
git tag -a "$tag" -m "livekit-agents $tag"
77+
git push origin "$tag"

.github/workflows/template-check.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# As this is a starter template project, we don't want to check in the uv.lock and livekit.toml files in its template form
22
# However, once you have cloned this repo for your own use, LiveKit recommends you check them in and delete this github workflow entirely
3-
3+
44
name: Template Check
55

66
on:
@@ -12,10 +12,10 @@ on:
1212
jobs:
1313
check-template-files:
1414
runs-on: ubuntu-latest
15-
15+
1616
steps:
17-
- uses: actions/checkout@v4
18-
17+
- uses: actions/checkout@v6
18+
1919
- name: Check template files not tracked in git
2020
run: |
2121
if git ls-files | grep -q "^uv\.lock$"; then
@@ -28,4 +28,4 @@ jobs:
2828
echo "Disable this test and commit the file once you have cloned this repo for your own use"
2929
exit 1
3030
fi
31-
echo "✓ uv.lock and livekit.toml are correctly not tracked in git"
31+
echo "✓ uv.lock and livekit.toml are correctly not tracked in git"

.github/workflows/tests.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,23 +9,23 @@ on:
99
jobs:
1010
test:
1111
runs-on: ubuntu-latest
12-
12+
1313
steps:
14-
- uses: actions/checkout@v4
15-
14+
- uses: actions/checkout@v6
15+
1616
- name: Install uv
1717
uses: astral-sh/setup-uv@v1
1818
with:
1919
version: "latest"
20-
20+
2121
- name: Set up Python
2222
uses: actions/setup-python@v4
2323
with:
24-
python-version: "3.12"
25-
24+
python-version: "3.14"
25+
2626
- name: Install dependencies
2727
run: UV_GIT_LFS=1 uv sync --dev
28-
28+
2929
- name: Run tests
3030
env:
3131
LIVEKIT_URL: ${{ secrets.LIVEKIT_URL }}

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ description = "Simple voice AI assistant built with LiveKit Agents for Python"
99
requires-python = ">=3.10, <3.15"
1010

1111
dependencies = [
12-
"livekit-agents[silero,turn-detector]~=1.5",
12+
"livekit-agents[silero,turn-detector]==1.5.12",
1313
"livekit-plugins-ai-coustics~=0.2",
1414
"python-dotenv",
1515
]

0 commit comments

Comments
 (0)