@devries-cameron20 / composio-1 / commits / 4386b28d5
Fork 0

Composio powers 1000+ toolkits, tool search, context management, authentication, and a sandboxed workbench to help you build AI agents that turn intent into action.

chore(py): add manual composio-core publisher (#4275)

Add a manual publisher for the final `composio-core` 0.7.22 deprecation release. It builds only the legacy package at the immutable merged source from #4270 (`7a9b0412fbdb33776f4d6c916537d74cb1bf0835`), using the current repository's locked release tools without build isolation. The default `publish=false` run builds and verifies exactly one wheel and one sdist, including their full deprecation descriptions and unchanged legacy Python compatibility. `publish=true` transfers those artifacts to a separate OIDC publishing job. No npm packages, providers, examples, fixtures, GitHub Releases, or archived release workflows are published. The previous PyPI token secrets no longer exist. Trusted publishing replaces them; the PyPI `composio-core` project must authorize repository `ComposioHQ/composio`, workflow `py.publish-composio-core.yml`, environment `pypi-composio-core`. A dedicated environment preserves the existing `pypi` environment's tag-only restriction. uv caching is disabled and uv is pinned to 0.13.4. Validation: full actionlint passed; built both distributions using frozen release tools; `twine==6.2.0 check --strict` passed; the workflow's artifact verifier accepted both real artifacts and rejected an unrelated example artifact and a modified package description. A build-only hosted dispatch precedes publication.

Alberto Schiabel committed Oct 22, 2026 at 17:54 UTC 4386b28d513a6232597079fd2badcc79b3dc5f8c
1 file changed +118
.github/workflows/py.publish-composio-core.yml new
+118
@@ -0,0 +1,118 @@
1 +name: Publish composio-core 0.7.22
2 +
3 +run-name: Publish composio-core 0.7.22 (publish=${{ inputs.publish }})
4 +
5 +on:
6 + workflow_dispatch:
7 + inputs:
8 + publish:
9 + description: Upload the verified artifacts to PyPI
10 + required: true
11 + type: boolean
12 + default: false
13 +
14 +permissions:
15 + contents: read
16 +
17 +concurrency:
18 + group: publish-composio-core-0.7.22
19 + cancel-in-progress: false
20 +
21 +jobs:
22 + build:
23 + name: Build composio-core
24 + runs-on: ubuntu-latest
25 + timeout-minutes: 10
26 + steps:
27 + - name: Checkout locked release tools
28 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
29 + with:
30 + persist-credentials: false
31 +
32 + - name: Checkout reviewed composio-core source
33 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
34 + with:
35 + ref: 7a9b0412fbdb33776f4d6c916537d74cb1bf0835 # PR #4270 merged into archive-v2
36 + path: legacy-source
37 + persist-credentials: false
38 +
39 + - name: Setup Python and uv
40 + uses: ./.github/actions/setup-python-uv
41 + with:
42 + uv-version: '0.13.4'
43 + enable-caching: 'false'
44 +
45 + - name: Install locked build tools
46 + working-directory: python
47 + env:
48 + UV_PROJECT_ENVIRONMENT: ${{ github.workspace }}/.release-venv
49 + run: uv sync --locked --only-group release
50 +
51 + - name: Build composio-core
52 + run: .release-venv/bin/python -m build --no-isolation legacy-source/python --outdir dist
53 +
54 + - name: Verify package identity and deprecation description
55 + run: |
56 + .release-venv/bin/python - <<'PY'
57 + from email import message_from_bytes
58 + from pathlib import Path
59 + import tarfile
60 + import zipfile
61 +
62 + dist = Path("dist")
63 + wheel = "composio_core-0.7.22-py3-none-any.whl"
64 + sdist = "composio_core-0.7.22.tar.gz"
65 + if {p.name for p in dist.iterdir()} != {wheel, sdist}:
66 + raise SystemExit("Expected only the composio-core 0.7.22 wheel and sdist")
67 + readme = Path("legacy-source/python/README.md").read_text(encoding="utf-8").strip()
68 + if not readme.startswith("# DEPRECATED: use `composio`"):
69 + raise SystemExit("Missing deprecation notice")
70 + with zipfile.ZipFile(dist / wheel) as archive:
71 + metadata = archive.read("composio_core-0.7.22.dist-info/METADATA")
72 + with tarfile.open(dist / sdist) as archive:
73 + package_info = archive.extractfile("composio_core-0.7.22/PKG-INFO").read()
74 + for content in (metadata, package_info):
75 + message = message_from_bytes(content)
76 + if message["Name"].replace("_", "-") != "composio-core" or message["Version"] != "0.7.22":
77 + raise SystemExit("Unexpected package identity")
78 + if set(message["Requires-Python"].split(",")) != {">=3.9", "<4"}:
79 + raise SystemExit("Legacy Python compatibility changed")
80 + if message.get_payload().strip() != readme:
81 + raise SystemExit("Package description differs from the reviewed README")
82 + print("Verified both composio-core 0.7.22 artifacts and their deprecation descriptions")
83 + PY
84 +
85 + - name: Store verified artifacts
86 + uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
87 + with:
88 + name: composio-core-0.7.22
89 + path: |
90 + dist/composio_core-0.7.22-py3-none-any.whl
91 + dist/composio_core-0.7.22.tar.gz
92 + if-no-files-found: error
93 + retention-days: 1
94 +
95 + # The composio-core project must trust this workflow and its dedicated environment.
96 + # Build steps never receive publishing credentials or an OIDC token.
97 + publish:
98 + name: Publish composio-core
99 + if: inputs.publish
100 + needs: build
101 + runs-on: ubuntu-latest
102 + timeout-minutes: 5
103 + environment:
104 + name: pypi-composio-core
105 + permissions:
106 + id-token: write
107 + steps:
108 + - name: Download verified artifacts
109 + uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
110 + with:
111 + name: composio-core-0.7.22
112 + path: dist/
113 +
114 + - name: Publish composio-core to PyPI
115 + uses: pypa/gh-action-pypi-publish@dc37677b2e1c63e2034f94d8a5b11f265b73ba33 # v1.14.2
116 + with:
117 + packages-dir: dist/
118 + skip-existing: true