Release the SDKs¶
Each SDK version comes from its package manifest. Update the manifest, lockfile as needed, and changelog for each SDK being released.
| SDK | Version source | Changelog | Git tag |
|---|---|---|---|
| Python | python/pyproject.toml |
python/CHANGELOG.md |
surfaces/python/vX.Y.Z |
| Rust | rust/Cargo.toml |
rust/CHANGELOG.md |
surfaces/rust/vX.Y.Z |
| TypeScript | typescript/package.json |
typescript/CHANGELOG.md |
surfaces/typescript/vX.Y.Z |
A run can use one tag or group several SDK tags on the same commit. A Python-only patch takes {"python":"surfaces/python/v0.1.1"} as the workflow input tags. A coordinated release passes all three tags in one object.
{
"python": "surfaces/python/v0.1.1",
"rust": "surfaces/rust/v0.1.1",
"typescript": "surfaces/typescript/v0.1.1"
}
Run stable releases and release candidates in separate batches. Release candidate tags, npm versions, and Cargo versions use X.Y.Z-rc.N. Python uses X.Y.ZrcN in its manifest and distributions.
Prepare and verify the selected SDKs¶
- Run Verify Surfaces release on
mainwithtagsanddownstream_refs. The downstream input maps each consumer to its full commit SHA. Select Publish the selected distributions after candidate downstream tests to upload through OIDC aftersurfaces-candidate-receiptis recorded. The workflow publishes stable npm versions undercandidateand release candidates undernext. - If a registry upload fails, rerun failed jobs. Matching files already on the registry are skipped. A checksum conflict stops publication and requires a new version to replace the conflicting bytes.
- Refresh the selected downstream locks using the published versions. Run the workflow again with the same
tags, the successful preparation run ID inartifact_run_id, and the downstream commits containing the refreshed locks. Select Download and verify the published artifacts. The workflow reuses the prepared archives, checks their public registry digests, installs the selected packages, and verifies stable downstream commits with unmodified locks. - For a stable release, select Promote npm latest and deploy Pages after stable registry and downstream verification in that second run. After it emits
surfaces-verified-receipt, the workflow promotes npmlatestif TypeScript was selected and triggers Pages when the verification run completes.
Configure one GitHub Actions Trusted Publisher per registry for apcore-surfaces. Use owner apstack, repository apcore-surfaces, and workflow filename release.yml. Set the environment to pypi, crates-io, or npm for the corresponding registry. The npm binding needs Allow npm publish and Allow npm dist-tag.
| SDK | Downstream repositories |
|---|---|
| Python | django-apcore, fastapi-apcore, flask-apcore, pydantic-ai-apcore, apflow, and workspace. Include the workspace sibling commits for apcore and mcp-embedded-ui-python. |
| Rust | axum-apcore and apexe. |
| TypeScript | hono-apcore, nestjs-apcore, and tiptap-apcore. The workflow also checks their standalone demos. |
Deploy the documentation¶
The Pages workflow deploys documentation changes from main and responds to completed release verification runs that request deployment. To retry a release deployment manually, use its stable verification run ID as release_run_id in the Pages workflow. Later deployments carry forward the other versions from the last successful Pages deployment. The deployment record preserves those versions after Actions artifacts expire. Before that record exists, Pages uses retained receipts and checks the public 0.1.0 archive digests for any SDK still missing from the version record. Use previous_release_run_ids to select specific retained receipts.
Before the first cutover, run scripts/check-legacy-recovery.sh python, scripts/check-legacy-recovery.sh rust, and scripts/check-legacy-recovery.sh typescript. These checks install the last standalone releases into temporary prefixes and exercise their command or import entry points.
To roll back a consumer, recreate its previous environment using the old package names and lockfile.
Package the Rust SDK¶
rust/ contains the Cargo project and lockfile. Prepare the crate from the repository root with the canonical Explorer and conformance fixtures copied into a temporary project directory:
staged_rust=$(mktemp -d)
export SOURCE_DATE_EPOCH=$(git log -1 --format=%ct)
python3 scripts/stage-rust-release.py "$staged_rust"
cargo +1.88.0 package --manifest-path "$staged_rust/Cargo.toml" --locked --all-features
The crate is written to $staged_rust/target/package/ unless CARGO_TARGET_DIR is set. When publishing to crates.io, prepare the same staging directory from the tagged commit with the same timestamp, then use cargo +1.88.0 publish --manifest-path "$staged_rust/Cargo.toml" --locked --all-features.