@@ -22,41 +22,46 @@ jobs:
22
22
working-directory : ./llama-index-server
23
23
if : |
24
24
github.event_name == 'push' &&
25
- !startsWith(github.ref, 'refs/heads/release/llama-index-server-v')
25
+ !startsWith(github.ref, 'refs/heads/release/llama-index-server-v') &&
26
+ !contains(github.event.head_commit.message, 'Release: llama-index-server v')
26
27
27
28
steps :
28
29
- name : Checkout Repository
29
30
uses : actions/checkout@v4
30
31
with :
31
32
fetch-depth : 0
32
33
34
+ - name : Install uv
35
+ uses : astral-sh/setup-uv@v5
36
+ with :
37
+ enable-cache : true
38
+
33
39
- name : Set up Python
34
40
uses : actions/setup-python@v5
35
41
with :
36
42
python-version : " 3.11"
37
43
38
- - name : Install Poetry
39
- run : |
40
- curl -sSL https://install.python-poetry.org | python3 -
41
-
42
44
- name : Install dependencies
43
- run : poetry install
45
+ shell : bash
46
+ run : uv sync --all-extras --dev
44
47
45
48
- name : Setup Git
46
49
run : |
47
50
git config --global user.email "github-actions[bot]@users.noreply.github.com"
48
51
git config --global user.name "github-actions[bot]"
49
52
50
53
- name : Bump patch version
54
+ shell : bash
51
55
run : |
52
- poetry version patch
56
+ uvx --from=toml-cli toml set --toml-path=pyproject.toml project. version $(uvx --from=toml-cli toml get --toml-path=pyproject.toml project.version | awk -F. '{$NF = $NF + 1;}1' OFS=.)
53
57
git add pyproject.toml
54
- git commit -m "chore(release): bump version to $(poetry version -s )"
58
+ git commit -m "chore(release): bump llama-index-server version to $(uvx --from=toml-cli toml get --toml-path=pyproject.toml project.version )"
55
59
56
60
- name : Get current version
57
61
id : get_version
62
+ shell : bash
58
63
run : |
59
- version=$(poetry version -s )
64
+ version=$(uvx --from=toml-cli toml get --toml-path=pyproject.toml project.version )
60
65
echo "current_version=${version}" >> "$GITHUB_OUTPUT"
61
66
62
67
- name : Create Release PR
@@ -91,31 +96,34 @@ jobs:
91
96
- name : Checkout Repository
92
97
uses : actions/checkout@v4
93
98
99
+ - name : Install uv
100
+ uses : astral-sh/setup-uv@v5
101
+ with :
102
+ enable-cache : true
103
+
94
104
- name : Set up Python
95
105
uses : actions/setup-python@v5
96
106
with :
97
107
python-version : " 3.11"
98
108
99
- - name : Install Poetry
100
- run : |
101
- curl -sSL https://install.python-poetry.org | python3 -
102
-
103
109
- name : Install dependencies
104
- run : poetry install
110
+ shell : bash
111
+ run : uv sync --all-extras
105
112
106
113
- name : Get current version
107
114
id : get_version
115
+ shell : bash
108
116
run : |
109
- version=$(poetry version -s )
117
+ version=$(uvx --from=toml-cli toml get --toml-path=pyproject.toml project.version )
110
118
echo "current_version=${version}" >> "$GITHUB_OUTPUT"
111
119
112
- - name : Build and publish to PyPI
113
-
114
- with :
115
- python_version : " 3.11 "
116
- pypi_token : ${{ secrets.PYPI_TOKEN }}
117
- package_directory : " llama-index-server "
118
- poetry_install_options : " --without dev "
120
+ - name : Build package
121
+ shell : bash
122
+ run : uv build --no-sources
123
+
124
+ - name : Publish to PyPI
125
+ shell : bash
126
+ run : uv publish --token ${{ secrets.PYPI_TOKEN }}
119
127
120
128
- name : Create GitHub Release
121
129
uses : softprops/action-gh-release@v2
0 commit comments