Skip to content

Version 1.5.0 - UiPathPlatformSettings / remove dependency from uipat… #29

Version 1.5.0 - UiPathPlatformSettings / remove dependency from uipat…

Version 1.5.0 - UiPathPlatformSettings / remove dependency from uipat… #29

Workflow file for this run

name: cd
on:
push:
branches:
- main
paths:
- 'src/uipath/llm_client/__version__.py'
workflow_dispatch:
jobs:
build:
name: Build package
runs-on: ubuntu-latest
environment: pypi
permissions:
contents: read
id-token: write
steps:
- uses: actions/checkout@v6
- name: Setup uv
uses: astral-sh/setup-uv@v7
with:
version: "0.9.27"
enable-cache: true
- name: "Set up Python"
uses: actions/setup-python@v6
with:
python-version-file: ".python-version"
- name: "Install dependencies"
run: uv sync --dev --all-extras --locked
- name: Build package
run: uv build --package uipath-llm-client
- name: Smoke test (wheel with all extras)
run: |
WHEEL=$(ls dist/*.whl)
uv run --isolated --no-project --with "${WHEEL}[all]" tests/core/core_smoke_test.py
- name: Smoke test (source distribution with all extras)
run: |
SDIST=$(ls dist/*.tar.gz)
uv run --isolated --no-project --with "${SDIST}[all]" tests/core/core_smoke_test.py
- name: Publish package
run: uv publish
release:
name: Create GitHub release
needs: build
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v6
- name: Get version
id: version
run: |
VERSION=$(grep '^__version__' src/uipath/llm_client/__version__.py | sed -n 's/.*"\([^"]*\)".*/\1/p')
echo "version=${VERSION}" >> "$GITHUB_OUTPUT"
- name: Extract changelog section
run: |
python3 -c "
import re
version = '''${{ steps.version.outputs.version }}'''
with open('CHANGELOG.md') as f:
content = f.read()
pattern = r'(## \[' + re.escape(version) + r'\][^\n]*\n)(.*?)(?=\n## \[|\Z)'
match = re.search(pattern, content, re.DOTALL)
notes = match.group(0).strip() if match else ('Release ' + version)
with open('release_notes.md', 'w') as f:
f.write(notes)
"
- name: Create GitHub release
uses: softprops/action-gh-release@v2
with:
tag_name: v${{ steps.version.outputs.version }}
name: UiPath LLM Client [v${{ steps.version.outputs.version }}]
body_path: release_notes.md
skip_if_tag_exists: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}