Publishing Packages
Each runtime package is published independently using GitHub Actions workflows triggered by tags. Push annotated tags to trigger the appropriate workflow.
Tag Conventions
Section titled “Tag Conventions”| Runtime | Tag Format | Example |
|---|---|---|
| Emitter/npm | emitter-v{version} | emitter-v0.2.0-beta.6 |
| C#/NuGet | csharp-v{version} | csharp-v1.0.0-beta.6 |
| Python/PyPI | python-v{version} | python-v1.0.0b6 |
| TypeScript/npm | typescript-v{version} | typescript-v1.0.0-beta.6 |
| Go | go-v{version} | go-v1.0.0-beta.6 |
| Docs | docs-v{version} | docs-v1.0.0-beta.6 |
Publishing a New Version
Section titled “Publishing a New Version”1. Ensure All Tests Pass
Section titled “1. Ensure All Tests Pass”Before publishing, verify all runtime tests pass:
cd runtime/csharp && dotnet testcd runtime/python/agentschema && uv run pytest tests/cd runtime/typescript/agentschema && npm testcd runtime/go/agentschema && go test ./...2. Create Annotated Tags
Section titled “2. Create Annotated Tags”Always use annotated tags with a descriptive message:
# TypeSpec Emitter / npm (agentschema-emitter)git tag -a "emitter-v0.1.11" -m "Emitter v0.1.11: description of changes"
# C# / NuGetgit tag -a "csharp-v1.0.0-beta.6" -m "C# SDK v1.0.0-beta.6: description of changes"
# Python / PyPI (note PEP 440 format)git tag -a "python-v1.0.0b6" -m "Python SDK v1.0.0-beta.6: description of changes"
# TypeScript / npmgit tag -a "typescript-v1.0.0-beta.6" -m "TypeScript SDK v1.0.0-beta.6: description of changes"
# Gogit tag -a "go-v1.0.0-beta.6" -m "Go SDK v1.0.0-beta.6: description of changes"
# Documentationgit tag -a "docs-v1.0.0-beta.6" -m "Docs v1.0.0-beta.6: description of changes"3. Push Tags
Section titled “3. Push Tags”Push the tag(s) to trigger the corresponding workflow(s):
# Push a single taggit push origin csharp-v1.0.0-beta.6
# Or push all tags at oncegit push origin --tags4. Monitor Workflows
Section titled “4. Monitor Workflows”Check the Actions tab to monitor the publish workflows.
Publishing All Runtimes
Section titled “Publishing All Runtimes”To publish a version for all runtimes at once (example for beta.6):
# Create all tagsgit tag -a "csharp-v1.0.0-beta.6" -m "C# SDK v1.0.0-beta.6"git tag -a "python-v1.0.0b6" -m "Python SDK v1.0.0-beta.6"git tag -a "typescript-v1.0.0-beta.6" -m "TypeScript SDK v1.0.0-beta.6"git tag -a "go-v1.0.0-beta.6" -m "Go SDK v1.0.0-beta.6"
# Push all tagsgit push origin --tagsManual Workflow Dispatch
Section titled “Manual Workflow Dispatch”You can also trigger workflows manually from the GitHub Actions UI:
- Go to Actions
- Select the appropriate workflow (e.g., “Publish C# to NuGet”)
- Click “Run workflow”
- Enter the version number if prompted
- Click “Run workflow”
Troubleshooting
Section titled “Troubleshooting”Tag Already Exists
Section titled “Tag Already Exists”If you need to recreate a tag:
# Delete local taggit tag -d csharp-v1.0.0-beta.6
# Delete remote taggit push origin :refs/tags/csharp-v1.0.0-beta.6
# Create new taggit tag -a "csharp-v1.0.0-beta.6" -m "C# SDK v1.0.0-beta.6"git push origin csharp-v1.0.0-beta.6Workflow Failed
Section titled “Workflow Failed”- Check the Actions tab for error details
- Common issues:
- Tests failed - fix the tests and create a new tag
- Authentication issues - check that secrets (NPM_TOKEN, NUGET_API_KEY) are configured
- PyPI OIDC - ensure Trusted Publisher is configured on PyPI
Package Registries
Section titled “Package Registries”- NuGet: https://www.nuget.org/packages/AgentSchema
- PyPI: https://pypi.org/project/agentschema/
- npm: https://www.npmjs.com/package/agentschema
- Go:
go get github.com/microsoft/AgentSchema/runtime/go/agentschema