Skip to content

feat: promote unsloth/Qwen3.6-27B-NVFP4 — cortex becomes multimodal (… #359

feat: promote unsloth/Qwen3.6-27B-NVFP4 — cortex becomes multimodal (…

feat: promote unsloth/Qwen3.6-27B-NVFP4 — cortex becomes multimodal (… #359

Workflow file for this run

name: Publish to PyPI
on:
push:
branches: [main]
paths:
- "pyproject.toml"
- "lobes/**"
- "packaging/**"
pull_request:
branches: [main]
paths:
- "pyproject.toml"
- "lobes/**"
- "packaging/**"
jobs:
test:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
- uses: astral-sh/setup-uv@38f3f104447c67c051c4a08e39b64a148898af3a # v4
with:
version: "0.11.29"
enable-cache: true
- run: uv python install 3.12
- run: uv sync
- run: uv run pytest -n auto -v
test-publish:
# Skip on fork PRs — no OIDC/environment context is available there, so the
# publish step would fail and block external contributor CI.
if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository
needs: test
runs-on: ubuntu-latest
environment: testpypi
permissions:
contents: read
id-token: write
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
- uses: astral-sh/setup-uv@38f3f104447c67c051c4a08e39b64a148898af3a # v4
with:
version: "0.11.29"
enable-cache: true
- run: uv python install 3.12
- run: uv sync
- name: Set dev version
run: |
BASE=$(uv run python -c "import tomllib; print(tomllib.load(open('pyproject.toml','rb'))['project']['version'])")
DEV_VERSION="${BASE}.dev${{ github.run_number }}"
sed -i "s/^version = .*/version = \"${DEV_VERSION}\"/" pyproject.toml
echo "DEV_VERSION=${DEV_VERSION}" >> "$GITHUB_ENV"
echo "Publishing ${DEV_VERSION} to TestPyPI"
- name: Build and publish to TestPyPI
run: |
uv build
uv publish --publish-url https://test.pypi.org/legacy/ --trusted-publishing always --check-url https://test.pypi.org/simple/
- name: Print install commands
if: always()
run: |
echo "::notice::Test with: uv tool install --index-url https://test.pypi.org/simple/ --index-strategy unsafe-best-match lobes-cli==${DEV_VERSION}"
publish:
if: github.event_name == 'push'
needs: test
runs-on: ubuntu-latest
environment: pypi
permissions:
contents: read
id-token: write
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
- uses: astral-sh/setup-uv@38f3f104447c67c051c4a08e39b64a148898af3a # v4
with:
version: "0.11.29"
enable-cache: true
- run: uv python install 3.12
- run: uv sync
- name: Build and publish to PyPI
run: |
uv build
uv publish --trusted-publishing always --check-url https://pypi.org/simple/
publish-alias:
if: github.event_name == 'push'
needs: [test, publish]
runs-on: ubuntu-latest
environment: pypi
permissions:
contents: read
id-token: write
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
- uses: astral-sh/setup-uv@38f3f104447c67c051c4a08e39b64a148898af3a # v4
with:
version: "0.11.29"
enable-cache: true
- run: uv python install 3.12
- name: Sync alias version to root version
run: |
BASE=$(uv run python -c "import tomllib;print(tomllib.load(open('pyproject.toml','rb'))['project']['version'])")
sed -i "s/^version = .*/version = \"${BASE}\"/" packaging/model-gear/pyproject.toml
sed -i "s/lobes-cli==.*/lobes-cli==${BASE}\"]/" packaging/model-gear/pyproject.toml
- name: Build and publish model-gear alias to PyPI
run: |
cd packaging/model-gear
uv build
uv publish --trusted-publishing always --check-url https://pypi.org/simple/