Skip to content

ignore private import error #18

ignore private import error

ignore private import error #18

Workflow file for this run

name: Publish Packages
on:
push:
tags:
- "v*"
workflow_dispatch:
permissions:
contents: read
concurrency:
group: publish-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: false
jobs:
publish:
name: Build And Publish Workspace
runs-on: ubuntu-latest
env:
UV_PUBLISH_TOKEN: ${{ secrets.PYPI_TOKEN }}
steps:
- name: Check Out Repository
uses: actions/checkout@v6
- name: Set Up Python
uses: actions/setup-python@v6
with:
python-version: "3.11"
- name: Set Up uv
uses: astral-sh/setup-uv@v7
with:
enable-cache: true
- name: Validate Release
run: |
uv sync --all-extras
make prod
- name: Build And Publish Root, Adapter, Helper, And Transport Projects
shell: bash
run: |
project_dirs() {
if [ -d packages/helpers ]; then
find packages/helpers -type f -name pyproject.toml -exec dirname {} \; | sort -u
fi
if [ -d packages/adapters ]; then
find packages/adapters -type f -name pyproject.toml -exec dirname {} \; | sort -u
fi
if [ -d packages/transports ]; then
find packages/transports -type f -name pyproject.toml -exec dirname {} \; | sort -u
fi
printf '.\n'
}
sync_project() {
local project_dir="$1"
local pyproject_path="$project_dir/pyproject.toml"
if grep -Eq '^\[project\.optional-dependencies\]' "$pyproject_path"; then
uv sync --project "$project_dir" --all-extras
else
uv sync --project "$project_dir"
fi
}
while IFS= read -r project_dir; do
echo "==> Publishing $project_dir"
sync_project "$project_dir"
rm -rf "$project_dir/dist"
uv build --project "$project_dir" --out-dir "$project_dir/dist"
uv publish "$project_dir"/dist/*
done < <(project_dirs)