Merge pull request #1055 from UiPath/akshaya/single_eval_runtime #889
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |