Skip to content

Commit 11525ce

Browse files
fix(ci): change steps based on wheter it is a -rc tag (#1646)
1 parent 2f8d98b commit 11525ce

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

.github/workflows/release.yml

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ jobs:
5555
VERSION_NUMBER=${VERSION#v}
5656
echo "tag_version=$VERSION_NUMBER" >> $GITHUB_OUTPUT
5757
- name: Check if version matches pyproject.toml
58+
if: startsWith(github.ref, 'refs/tags/v') && !contains(github.ref, '-')
5859
# zizmor: ignore[template-injection]
5960
run: |
6061
TAG_VERSION=${{ steps.extract_info.outputs.tag_version }}
@@ -141,8 +142,19 @@ jobs:
141142
version: ${{ env.UV_VERSION }}
142143
python-version: ${{ env.PYTHON_VERSION }}
143144
- name: Install lerobot release
144-
run: uv run pip install "lerobot[all]==${{ needs.build-and-publish.outputs.version }}" # zizmor: ignore[template-injection]
145-
145+
# zizmor: ignore[template-injection]
146+
run: |
147+
VERSION="${{ needs.build-and-publish.outputs.version }}"
148+
if [[ "$VERSION" == *-* ]]; then
149+
echo "Installing pre-release version $VERSION from TestPyPI..."
150+
uv run pip install \
151+
--index-url https://test.pypi.org/simple/ \
152+
--extra-index-url https://pypi.org/simple \
153+
"lerobot[all]==$VERSION"
154+
else
155+
echo "Installing release version $VERSION from PyPI..."
156+
uv run pip install "lerobot[all]==$VERSION"
157+
fi
146158
- name: Check lerobot version
147159
run: uv run python -c "import lerobot; print(lerobot.__version__)"
148160

0 commit comments

Comments
 (0)