Skip to content

Merge pull request #1035 from UiPath/feat/add-internal-tools #879

Merge pull request #1035 from UiPath/feat/add-internal-tools

Merge pull request #1035 from UiPath/feat/add-internal-tools #879

Workflow file for this run

name: CD
on:
workflow_dispatch:
push:
branches:
- main
paths:
- pyproject.toml
jobs:
lint:
uses: ./.github/workflows/lint.yml
test:
uses: ./.github/workflows/test.yml
build:
name: Build
runs-on: ubuntu-latest
needs:
- lint
- test
if: ${{ github.repository == 'UiPath/uipath-python' }}
permissions:
contents: read
actions: write
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup uv
uses: astral-sh/setup-uv@v5
with:
enable-cache: true
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version-file: ".python-version"
- name: Install dependencies
run: uv sync --all-extras
- name: Update AGENTS.md
run: uv run python scripts/update_agents_md.py
- name: Replace connection string placeholder
run: |
originalfile="src/uipath/telemetry/_constants.py"
tmpfile=$(mktemp)
trap 'rm -f "$tmpfile"' EXIT
rsync -a --no-whole-file --ignore-existing "$originalfile" "$tmpfile"
envsubst '$CONNECTION_STRING' < "$originalfile" > "$tmpfile" && mv "$tmpfile" "$originalfile"
env:
CONNECTION_STRING: ${{ secrets.APPINS_CONNECTION_STRING }}
- name: Build
run: uv build
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: release-dists
path: dist/
pypi-publish:
name: Upload release to PyPI
runs-on: ubuntu-latest
environment: pypi
needs:
- build
permissions:
contents: read
id-token: write
steps:
- name: Retrieve release distributions
uses: actions/download-artifact@v4
with:
name: release-dists
path: dist/
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1