Skip to content

v0.10.0-preview3

Choose a tag to compare

@zxyao145 zxyao145 released this 26 Jan 13:17
f7b2470
Claude/add GitHub actions ci h co33 (#4)

* ci: add GitHub Actions workflow for continuous integration

Add comprehensive CI workflow that:
- Runs on push and pull requests to all branches
- Tests on multiple OS (Ubuntu, Windows, macOS) for cross-platform compatibility
- Uses .NET 8.0 SDK for compatibility testing
- Builds solution in Release configuration
- Runs all tests with verbose output
- Packs NuGet packages and uploads as artifacts (Ubuntu only)

* ci: update .NET version to 10.0.x to match project target

* ci: remove artifact upload step from workflow

* ci: add workflow to publish packages to NuGet on tag creation

This workflow triggers when a version tag (v*) is pushed and:
- Builds the solution in Release configuration
- Packs both ClaudeCodeSdk and ClaudeCodeSdk.MAF packages
- Publishes packages to nuget.org using NUGET_API_KEY secret
- Skips duplicates to avoid errors on re-runs

Note: Requires NUGET_API_KEY secret to be configured in repository settings

* ci: use tag version for packages and publish symbol packages

- Extract version from git tag (e.g., v0.10.0 -> 0.10.0)
- Pass version to dotnet pack using -p:PackageVersion
- Publish both .nupkg and .snupkg (symbol packages) to NuGet.org

* ci: fix build dependencies between ClaudeCodeSdk and ClaudeCodeSdk.MAF

- Build and test in Debug configuration (uses ProjectReference)
- For Release packing, pack ClaudeCodeSdk first, add it as local source,
  then build and pack ClaudeCodeSdk.MAF which depends on it
- This handles the conditional dependency in ClaudeCodeSdk.MAF.csproj
  (Debug uses ProjectReference, Release uses PackageReference)

* ci: fix Release build for ClaudeCodeSdk.MAF dependency

ClaudeCodeSdk.MAF has conditional dependency:
- Debug: ProjectReference to ClaudeCodeSdk
- Release: PackageReference to ClaudeCodeSdk

Both workflows now:
1. Build and pack ClaudeCodeSdk in Release first
2. Add its output as a local NuGet source
3. Build and pack ClaudeCodeSdk.MAF in Release (finds ClaudeCodeSdk from local source)

This ensures ClaudeCodeSdk.MAF can resolve its dependency in Release configuration.

* ci: use absolute path for local NuGet package source

---------

Co-authored-by: Claude <noreply@anthropic.com>