File tree 1 file changed +34
-0
lines changed
1 file changed +34
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Publish Dev Release to PyPI
2
+
3
+ on :
4
+ workflow_dispatch :
5
+
6
+ jobs :
7
+ publish-dev-release :
8
+ runs-on : ubuntu-latest
9
+
10
+ steps :
11
+ - name : Checkout code
12
+ uses : actions/checkout@v2
13
+
14
+ - name : Set up Python
15
+ uses : actions/setup-python@v2
16
+ with :
17
+ python-version : 3.8 # Adjust the Python version as needed
18
+
19
+ - name : Install dependencies
20
+ run : pip install toml twine
21
+
22
+ - name : Read version from pyproject.toml
23
+ id : read-version
24
+ run : |
25
+ version=$(python -c 'import toml; print(toml.load("pyproject.toml")["tool"]["commitizen"]["version"])')
26
+ printf "LITELLM_VERSION=%s" "$version" >> $GITHUB_ENV
27
+
28
+ - name : Check if version exists on PyPI
29
+ id : check-version
30
+ run : |
31
+ set -e
32
+ if twine check --repository-url https://pypi.org/simple/ "litellm==$LITELLM_VERSION" >/dev/null 2>&1; then
33
+ echo "Version $LITELLM_VERSION already exists on PyPI. Skipping publish."
34
+
You can’t perform that action at this time.
0 commit comments