Skip to content
Open
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
98 changes: 98 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
name: Release

on:
push:
tags:
- "v*.*.*"
- "v*.*.*-alpha.*"
- "v*.*.*-beta.*"

permissions:
contents: read
id-token: write # Required for npm provenance

env:
NODE_VERSION: "22.x"

jobs:
verify-version:
name: Verify version
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Extract version from tag
id: tag
run: |
TAG=${GITHUB_REF#refs/tags/v}
echo "version=$TAG" >> $GITHUB_OUTPUT
echo "Tagged version: $TAG"

- name: Read package.json version
id: package
run: |
VERSION=$(node -p "require('./package.json').version")
echo "version=$VERSION" >> $GITHUB_OUTPUT
echo "Package version: $VERSION"

- name: Compare versions
run: |
if [ "${{ steps.tag.outputs.version }}" != "${{ steps.package.outputs.version }}" ]; then
echo "ERROR: Tag version (${{ steps.tag.outputs.version }}) does not match package.json version (${{ steps.package.outputs.version }})"
exit 1
fi
echo "Versions match: ${{ steps.tag.outputs.version }}"

publish:
name: Publish to npm
runs-on: ubuntu-latest
needs: verify-version
environment:
name: npm
url: https://www.npmjs.com/package/@ampersend_ai/clawrouter

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
package_json_file: package.json

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
registry-url: "https://registry.npmjs.org"
cache: "pnpm"
cache-dependency-path: pnpm-lock.yaml

- name: Update npm
run: npm install -g npm@latest

- name: Install dependencies
run: pnpm install --frozen-lockfile

- name: Build package
run: pnpm build

- name: Determine publish tag
id: publish-tag
run: |
VERSION="${GITHUB_REF#refs/tags/v}"
if [[ "$VERSION" == *"-alpha."* ]]; then
echo "tag=alpha" >> $GITHUB_OUTPUT
echo "Publishing with tag: alpha"
elif [[ "$VERSION" == *"-beta."* ]]; then
echo "tag=beta" >> $GITHUB_OUTPUT
echo "Publishing with tag: beta"
else
echo "tag=latest" >> $GITHUB_OUTPUT
echo "Publishing with tag: latest"
fi

- name: Publish to npm
run: npm publish --access public --tag ${{ steps.publish-tag.outputs.tag }}
13 changes: 7 additions & 6 deletions openclaw.plugin.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,22 @@
"configSchema": {
"type": "object",
"properties": {
"walletKey": {
"ampersend_agent_key": {
"type": "string",
"description": "EVM wallet private key (0x...). Optional — auto-generated if not set."
"description": "Ampersend agent key (smartAccountAddress:::sessionKey). Get from https://app.ampersend.ai"
},
"routing": {
"type": "object",
"description": "Override default routing configuration"
}
}
},
"required": ["ampersend_agent_key"]
},
"uiHints": {
"walletKey": {
"label": "Wallet Private Key",
"ampersend_agent_key": {
"label": "Ampersend Agent Key",
"sensitive": true,
"placeholder": "0x... (optional — auto-generated)"
"placeholder": "0x...:::0x... (from app.ampersend.ai)"
}
}
}
Loading
Loading