|
1 | | -name: publish-python-sdk |
| 1 | +# name: publish-python-sdk |
2 | 2 |
|
3 | | -on: |
4 | | - release: |
5 | | - types: [published] |
6 | | - workflow_dispatch: |
| 3 | +# on: |
| 4 | +# release: |
| 5 | +# types: [published] |
| 6 | +# workflow_dispatch: |
7 | 7 |
|
8 | | -jobs: |
9 | | - publish: |
10 | | - runs-on: ubuntu-latest |
11 | | - permissions: |
12 | | - contents: read |
13 | | - steps: |
14 | | - - name: Checkout repository |
15 | | - uses: actions/checkout@v4 |
| 8 | +# jobs: |
| 9 | +# publish: |
| 10 | +# runs-on: ubuntu-latest |
| 11 | +# permissions: |
| 12 | +# contents: read |
| 13 | +# steps: |
| 14 | +# - name: Checkout repository |
| 15 | +# uses: actions/checkout@v4 |
16 | 16 |
|
17 | | - - name: Setup Bun |
18 | | - uses: oven-sh/setup-bun@v1 |
19 | | - with: |
20 | | - bun-version: 1.2.21 |
| 17 | +# - name: Setup Bun |
| 18 | +# uses: oven-sh/setup-bun@v1 |
| 19 | +# with: |
| 20 | +# bun-version: 1.2.21 |
21 | 21 |
|
22 | | - - name: Install dependencies (JS/Bun) |
23 | | - run: bun install |
| 22 | +# - name: Install dependencies (JS/Bun) |
| 23 | +# run: bun install |
24 | 24 |
|
25 | | - - name: Install uv |
26 | | - shell: bash |
27 | | - run: curl -LsSf https://astral.sh/uv/install.sh | sh |
| 25 | +# - name: Install uv |
| 26 | +# shell: bash |
| 27 | +# run: curl -LsSf https://astral.sh/uv/install.sh | sh |
28 | 28 |
|
29 | | - - name: Generate Python SDK from OpenAPI (CLI) |
30 | | - shell: bash |
31 | | - run: | |
32 | | - ~/.local/bin/uv run --project packages/sdk/python python packages/sdk/python/scripts/generate.py --source cli |
| 29 | +# - name: Generate Python SDK from OpenAPI (CLI) |
| 30 | +# shell: bash |
| 31 | +# run: | |
| 32 | +# ~/.local/bin/uv run --project packages/sdk/python python packages/sdk/python/scripts/generate.py --source cli |
33 | 33 |
|
34 | | - - name: Sync Python dependencies |
35 | | - shell: bash |
36 | | - run: | |
37 | | - ~/.local/bin/uv sync --dev --project packages/sdk/python |
| 34 | +# - name: Sync Python dependencies |
| 35 | +# shell: bash |
| 36 | +# run: | |
| 37 | +# ~/.local/bin/uv sync --dev --project packages/sdk/python |
38 | 38 |
|
39 | | - - name: Set version from release tag |
40 | | - shell: bash |
41 | | - run: | |
42 | | - TAG="${GITHUB_REF_NAME:-}" |
43 | | - if [ -z "$TAG" ]; then |
44 | | - TAG="$(git describe --tags --abbrev=0 || echo 0.0.0)" |
45 | | - fi |
46 | | - echo "Using version: $TAG" |
47 | | - VERSION="$TAG" ~/.local/bin/uv run --project packages/sdk/python python - <<'PY' |
48 | | -import os, re, pathlib |
49 | | -root = pathlib.Path('packages/sdk/python') |
50 | | -pt = (root / 'pyproject.toml').read_text() |
51 | | -version = os.environ.get('VERSION','0.0.0').lstrip('v') |
52 | | -pt = re.sub(r'(?m)^(version\s*=\s*")[^"]+("\s*)$', f"\\1{version}\\2", pt) |
53 | | -(root / 'pyproject.toml').write_text(pt) |
54 | | -# Also update generator config override for consistency |
55 | | -cfgp = root / 'openapi-python-client.yaml' |
56 | | -if cfgp.exists(): |
57 | | - cfg = cfgp.read_text() |
58 | | - cfg = re.sub(r'(?m)^(package_version_override:\s*)\S+$', f"\\1{version}", cfg) |
59 | | - cfgp.write_text(cfg) |
60 | | -PY |
| 39 | +# - name: Set version from release tag |
| 40 | +# shell: bash |
| 41 | +# run: | |
| 42 | +# TAG="${GITHUB_REF_NAME:-}" |
| 43 | +# if [ -z "$TAG" ]; then |
| 44 | +# TAG="$(git describe --tags --abbrev=0 || echo 0.0.0)" |
| 45 | +# fi |
| 46 | +# echo "Using version: $TAG" |
| 47 | +# VERSION="$TAG" ~/.local/bin/uv run --project packages/sdk/python python - <<'PY' |
| 48 | +# import os, re, pathlib |
| 49 | +# root = pathlib.Path('packages/sdk/python') |
| 50 | +# pt = (root / 'pyproject.toml').read_text() |
| 51 | +# version = os.environ.get('VERSION','0.0.0').lstrip('v') |
| 52 | +# pt = re.sub(r'(?m)^(version\s*=\s*")[^"]+("\s*)$', f"\\1{version}\\2", pt) |
| 53 | +# (root / 'pyproject.toml').write_text(pt) |
| 54 | +# # Also update generator config override for consistency |
| 55 | +# cfgp = root / 'openapi-python-client.yaml' |
| 56 | +# if cfgp.exists(): |
| 57 | +# cfg = cfgp.read_text() |
| 58 | +# cfg = re.sub(r'(?m)^(package_version_override:\s*)\S+$', f"\\1{version}", cfg) |
| 59 | +# cfgp.write_text(cfg) |
| 60 | +# PY |
61 | 61 |
|
62 | | - - name: Build and publish to PyPI |
63 | | - env: |
64 | | - PYPI_TOKEN: ${{ secrets.PYPI_API_TOKEN }} |
65 | | - shell: bash |
66 | | - run: | |
67 | | - ~/.local/bin/uv run --project packages/sdk/python python packages/sdk/python/scripts/publish.py |
| 62 | +# - name: Build and publish to PyPI |
| 63 | +# env: |
| 64 | +# PYPI_TOKEN: ${{ secrets.PYPI_API_TOKEN }} |
| 65 | +# shell: bash |
| 66 | +# run: | |
| 67 | +# ~/.local/bin/uv run --project packages/sdk/python python packages/sdk/python/scripts/publish.py |
0 commit comments