Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions .github/workflows/create-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -112,12 +112,27 @@ jobs:
version: ${{ needs.detect-release.outputs.version }}
secrets: inherit

publish-rust:
name: Publish Rust SDK
needs: detect-release
if: needs.detect-release.outputs.should_release == 'true'
uses: ./.github/workflows/reusable-sdk-release.yml
permissions:
contents: read
with:
sdk: rust
working-directory: runagent-rust/runagent
tag: ${{ needs.detect-release.outputs.latest_tag }}
version: ${{ needs.detect-release.outputs.version }}
secrets: inherit

create-release:
name: Create GitHub Release
needs:
- detect-release
- publish-python
- publish-typescript
- publish-rust
if: needs.detect-release.outputs.should_release == 'true'
runs-on: ubuntu-latest
permissions:
Expand Down
16 changes: 16 additions & 0 deletions .github/workflows/reusable-sdk-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,18 @@ on:
required: false
type: string
default: "20"
rust:
description: Enable Rust publish path (sdk == rust)
required: false
type: string
default: ""
secrets:
PYPI_API_TOKEN:
required: false
NPM_TOKEN:
required: false
CARGO_REGISTRY_TOKEN:
required: false

jobs:
python:
Expand All @@ -56,3 +63,12 @@ jobs:
node-version: ${{ inputs.node-version }}
secrets: inherit

rust:
if: inputs.sdk == 'rust' && inputs.version != ''
uses: ./.github/workflows/rust-release.yml
with:
working-directory: ${{ inputs.working-directory }}
tag: ${{ inputs.tag }}
version: ${{ inputs.version }}
secrets: inherit

102 changes: 102 additions & 0 deletions .github/workflows/rust-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
name: Rust SDK Release

on:
workflow_call:
inputs:
working-directory:
description: Path where cargo commands should run
required: true
type: string
tag:
description: Git tag for this release (e.g., v0.1.0)
required: true
type: string
version:
description: Crate version without the leading v (e.g., 0.1.0)
required: true
type: string

jobs:
publish:
name: Publish Rust SDK
runs-on: ubuntu-latest
if: inputs.version != ''
permissions:
contents: read
id-token: write
defaults:
run:
shell: bash
working-directory: ${{ inputs.working-directory }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Show release context
run: |
echo "Tag: ${{ inputs.tag }}"
echo "Version: ${{ inputs.version }}"
echo "Working directory: ${{ inputs.working-directory }}"

- name: Set up Rust
uses: dtolnay/rust-toolchain@stable

- name: Authenticate to crates.io (trusted publishing)
id: auth
uses: rust-lang/crates-io-auth-action@v1

- name: Verify crate version matches tag
id: verify-rust-version
run: |
TAG_VERSION="${{ inputs.version }}"
PACKAGE_VERSION=$(grep -E '^version\s*=' Cargo.toml | head -1 | sed -E 's/^version\s*=\s*"([^"]+)".*/\1/')
echo "Detected crate version: $PACKAGE_VERSION"
if [ "$PACKAGE_VERSION" != "$TAG_VERSION" ]; then
echo "❌ Version mismatch! Tag: $TAG_VERSION, Cargo.toml: $PACKAGE_VERSION"
exit 1
fi
echo "✅ Rust crate version matches tag"

- name: Get crate name
id: get-crate
run: |
NAME=$(grep -E '^name\s*=' Cargo.toml | head -1 | sed -E 's/^name\s*=\s*"([^"]+)".*/\1/')
echo "crate_name=$NAME" >> "$GITHUB_OUTPUT"
echo "Crate name: $NAME"

- name: Check if crate version already exists on crates.io
id: check-crates
run: |
VERSION="${{ inputs.version }}"
NAME="${{ steps.get-crate.outputs.crate_name }}"
HTTP_CODE=$(curl -s -o /dev/null -w "%{http_code}" "https://crates.io/api/v1/crates/$NAME/$VERSION")
if [ "$HTTP_CODE" = "200" ]; then
echo "⚠️ $NAME v$VERSION already exists on crates.io"
echo "should_publish=false" >> "$GITHUB_OUTPUT"
else
echo "✅ $NAME v$VERSION not found on crates.io"
echo "should_publish=true" >> "$GITHUB_OUTPUT"
fi

- name: Lint and test (clippy + tests)
run: |
cargo fmt -- --check
cargo clippy --all-targets --all-features -- -D warnings
cargo test --all-features

- name: Package dry run
run: cargo publish --dry-run

- name: Publish crate to crates.io
if: steps.check-crates.outputs.should_publish == 'true'
run: cargo publish
env:
CARGO_REGISTRY_TOKEN: ${{ steps.auth.outputs.token }}

- name: Skip publish (already exists)
if: steps.check-crates.outputs.should_publish != 'true'
run: echo "Skipping crates.io publish because version already exists."


8 changes: 2 additions & 6 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,10 @@
# Changelog
All notable changes to this project's latest version.

## [0.1.32] - 2025-11-14

### Features

- Added /architecture endpoint support to all server & sdk
## [0.1.36] - 2025-11-18

### Miscellaneous Tasks

- Bump version to v0.1.32
- Bump version to v0.1.36

<!-- generated by git-cliff -->
6 changes: 3 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ build-backend = "hatchling.build"

[project]
name = "runagent"
version = "0.1.33"
version = "0.1.36"
description = "A command-line tool and SDK for deploying, managing, and interacting with AI agents"
readme = "README.md"
requires-python = ">=3.9"
Expand Down Expand Up @@ -103,7 +103,7 @@ line_length = 88
skip = ["docs"]

[tool.mypy]
python_version = "0.1.33"
python_version = "0.1.36"
warn_return_any = true
warn_unused_configs = true
disallow_untyped_defs = true
Expand Down Expand Up @@ -159,7 +159,7 @@ fail_under = 80

[tool.ruff]
line-length = 88
target-version = "0.1.33"
target-version = "0.1.36"
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
Expand Down
78 changes: 78 additions & 0 deletions runagent-go/PUBLISH.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
## Publishing `runagent-go`

The Go SDK is distributed through this monorepo using Go modules. Releasing a new version requires tagging the repository so `go get github.com/runagent-dev/runagent/runagent-go/runagent@vX.Y.Z` resolves to the new code.

---

### 1. Prerequisites

- Go 1.21+ installed locally.
- Write access to the repo and permission to push tags.
- Clean working tree (`git status` should be clean or contain only staged release commits).

---

### 2. Preflight Checklist

1. **Bump the SDK version**
- Update `runagent/runagent-go/runagent/version.go`.
- Follow semver (increment patch for fixes, minor for new features, major for breaking changes).
2. **Changelog / release notes**
- Update the main repo changelog or docs to record the release.
3. **Verify dependencies**
- Run `go mod tidy` from `runagent-go/`.
- Ensure `go.mod`/`go.sum` contain only the needed deps.

---

### 3. Build & Test

```bash
# From runagent-go/
go test ./runagent/...
golangci-lint run ./runagent/... # optional but recommended
```

For extra assurance, run the example binaries:

```bash
go run ./examples/basic.go
go run ./examples/streaming.go
```

---

### 4. Commit & Tag

```bash
git add runagent-go
git commit -m "chore(go): release v0.1.34"

# Tag with the `sdk-go-` prefix so automation can detect it
git tag sdk-go-v0.1.34
git push origin main
git push origin sdk-go-v0.1.34
```

> If releasing from a feature branch, merge it first (or push the tag from the release branch) so `main` reflects the published state.

---

### 5. Post-Publish

- Announce the release internally and update documentation links (docs site, README tables, etc.).
- Monitor `go proxy` and `pkg.go.dev` (usually available within minutes after pushing the tag).
- Verify `go list -m github.com/runagent-dev/runagent/runagent-go/runagent@latest` resolves to the new version.

---

### Troubleshooting

- **`module lookup disabled`**: ensure the tag exists on the default branch and follows the `vX.Y.Z` semver format.
- **Stale code from `go get`**: run `GONOSUMDB=* GOPROXY=direct go list -m github.com/...@latest` to force a refresh.
- **Forgot to bump version**: retagging is not supported; create a new patch release (e.g., `v0.1.35`) with the correct version.

---

You’re done! 🚀

Loading