Skip to content

feat: allow guardrail evaluation to carry attachment references (#1895) #1340

feat: allow guardrail evaluation to carry attachment references (#1895)

feat: allow guardrail evaluation to carry attachment references (#1895) #1340

Workflow file for this run

name: CD
on:
workflow_dispatch:
push:
branches:
- main
- 'release/**'
paths:
- 'packages/*/pyproject.toml'
- '!packages/*/samples/**/pyproject.toml'
- '!packages/*/testcases/**/pyproject.toml'
permissions:
contents: read
pull-requests: read
id-token: write
actions: write
jobs:
detect-publishable-packages:
runs-on: uipath-ubuntu-latest
outputs:
packages: ${{ steps.detect.outputs.packages || '[]' }}
count: ${{ steps.detect.outputs.count || '0' }}
steps:
- name: Checkout
uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
- name: Setup Python
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
with:
python-version: '3.11'
- name: Detect publishable packages
id: detect
if: ${{ !github.event.created }}
run: python .github/scripts/detect_publishable_packages.py
# --- Tier 0: uipath-core (no internal dependencies) ---
build-uipath-core:
needs: detect-publishable-packages
if: contains(fromJson(needs.detect-publishable-packages.outputs.packages), 'uipath-core')
uses: ./.github/workflows/build-package.yml
with:
package: uipath-core
needs-relock: false
publish-uipath-core:
name: Publish uipath-core
needs: [detect-publishable-packages, build-uipath-core]
if: contains(fromJson(needs.detect-publishable-packages.outputs.packages), 'uipath-core')
runs-on: uipath-ubuntu-latest
environment: pypi
permissions:
contents: read
id-token: write
steps:
- name: Retrieve release distributions
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
with:
name: release-dists-uipath-core
path: dist/
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@dc37677b2e1c63e2034f94d8a5b11f265b73ba33 # release/v1
with:
verbose: true
skip-existing: true
wait-for-uipath-core:
name: Wait for uipath-core on PyPI
needs: [detect-publishable-packages, publish-uipath-core]
if: |
always() &&
(contains(fromJson(needs.detect-publishable-packages.outputs.packages), 'uipath-platform') ||
contains(fromJson(needs.detect-publishable-packages.outputs.packages), 'uipath'))
runs-on: uipath-ubuntu-latest
steps:
- name: Checkout
if: contains(fromJson(needs.detect-publishable-packages.outputs.packages), 'uipath-core')
uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
- name: Setup Python
if: contains(fromJson(needs.detect-publishable-packages.outputs.packages), 'uipath-core')
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
with:
python-version: '3.11'
- name: Wait for uipath-core
if: contains(fromJson(needs.detect-publishable-packages.outputs.packages), 'uipath-core')
run: python .github/scripts/wait_for_pypi.py uipath-core
- name: Skip
if: "!contains(fromJson(needs.detect-publishable-packages.outputs.packages), 'uipath-core')"
run: echo "uipath-core not being published — skipping wait"
# --- Tier 1: uipath-platform (depends on core) ---
build-uipath-platform:
needs: [detect-publishable-packages, wait-for-uipath-core]
if: |
always() &&
contains(fromJson(needs.detect-publishable-packages.outputs.packages), 'uipath-platform')
uses: ./.github/workflows/build-package.yml
with:
package: uipath-platform
needs-relock: true
publish-uipath-platform:
name: Publish uipath-platform
needs: [detect-publishable-packages, build-uipath-platform]
if: |
always() &&
contains(fromJson(needs.detect-publishable-packages.outputs.packages), 'uipath-platform')
runs-on: uipath-ubuntu-latest
environment: pypi
permissions:
contents: read
id-token: write
steps:
- name: Retrieve release distributions
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
with:
name: release-dists-uipath-platform
path: dist/
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@dc37677b2e1c63e2034f94d8a5b11f265b73ba33 # release/v1
with:
verbose: true
skip-existing: true
wait-for-uipath-platform:
name: Wait for uipath-platform on PyPI
needs: [detect-publishable-packages, publish-uipath-platform]
if: |
always() &&
contains(fromJson(needs.detect-publishable-packages.outputs.packages), 'uipath')
runs-on: uipath-ubuntu-latest
steps:
- name: Checkout
if: contains(fromJson(needs.detect-publishable-packages.outputs.packages), 'uipath-platform')
uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
- name: Setup Python
if: contains(fromJson(needs.detect-publishable-packages.outputs.packages), 'uipath-platform')
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
with:
python-version: '3.11'
- name: Wait for uipath-platform
if: contains(fromJson(needs.detect-publishable-packages.outputs.packages), 'uipath-platform')
run: python .github/scripts/wait_for_pypi.py uipath-platform
- name: Skip
if: "!contains(fromJson(needs.detect-publishable-packages.outputs.packages), 'uipath-platform')"
run: echo "uipath-platform not being published — skipping wait"
# --- Tier 2: uipath (depends on core + platform) ---
build-uipath:
needs: [detect-publishable-packages, wait-for-uipath-platform]
if: |
always() &&
contains(fromJson(needs.detect-publishable-packages.outputs.packages), 'uipath')
uses: ./.github/workflows/build-package.yml
with:
package: uipath
needs-relock: true
secrets:
APPLICATIONINSIGHTS_CONNECTION_STRING_ALPHA: ${{ secrets.APPLICATIONINSIGHTS_CONNECTION_STRING_ALPHA }}
APPLICATIONINSIGHTS_CONNECTION_STRING_STAGING: ${{ secrets.APPLICATIONINSIGHTS_CONNECTION_STRING_STAGING }}
APPLICATIONINSIGHTS_CONNECTION_STRING_PROD: ${{ secrets.APPLICATIONINSIGHTS_CONNECTION_STRING_PROD }}
publish-uipath:
name: Publish uipath
needs: [detect-publishable-packages, build-uipath]
if: |
always() &&
contains(fromJson(needs.detect-publishable-packages.outputs.packages), 'uipath')
runs-on: uipath-ubuntu-latest
environment: pypi
permissions:
contents: read
id-token: write
steps:
- name: Retrieve release distributions
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
with:
name: release-dists-uipath
path: dist/
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@dc37677b2e1c63e2034f94d8a5b11f265b73ba33 # release/v1
with:
verbose: true
skip-existing: true