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
30 changes: 0 additions & 30 deletions .github/workflows/publish_npm_agentkit_langchain.yml

This file was deleted.

This file was deleted.

30 changes: 0 additions & 30 deletions .github/workflows/publish_npm_agentkit_vercel_ai_sdk.yml

This file was deleted.

27 changes: 0 additions & 27 deletions .github/workflows/publish_npm_create_onchain_agent.yml

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
name: Publish AgentKit to NPM
name: Publish Package to NPM

on:
workflow_dispatch:
inputs:
directory:
description: "Directory within the 'typescript' folder containing the package to publish (e.g., agentkit)"
required: true
type: string
default: "agentkit"

jobs:
deploy-npm-agentkit:
deploy-npm-package:
runs-on: ubuntu-latest
permissions:
contents: read
Expand All @@ -17,8 +23,8 @@ jobs:
registry-url: "https://registry.npmjs.org"
cache: "npm"
cache-dependency-path: ./typescript
- name: Install, build and publish @coinbase/agentkit
working-directory: ./typescript/agentkit
- name: Install, build and publish package
working-directory: ./typescript/${{ inputs.directory }}
run: |
npm ci
npm run build
Expand Down
41 changes: 41 additions & 0 deletions .github/workflows/version_publish_npm.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Version and Publish NPM

on:
push:
branches:
- main
workflow_dispatch:

concurrency: ${{ github.workflow }}-${{ github.ref }}

jobs:
version-and-publish:
name: Version and Publish
runs-on: ubuntu-latest
steps:
- name: Clone repository
uses: actions/checkout@v4

- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: "18"
registry-url: "https://registry.npmjs.org"
cache: "npm"
cache-dependency-path: ./typescript

- name: Install dependencies
run: npm ci
working-directory: ./typescript

- name: Version and/or Publish to NPM
uses: changesets/action@06245a4e0a36c064a573d4150030f5ec548e4fcc
with:
commit: "chore: version packages"
title: "chore: version packages"
version: npm run changeset:version
publish: npm run publish
cwd: ./typescript
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
2 changes: 1 addition & 1 deletion CONTRIBUTING-TYPESCRIPT.md
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ Changesets are stored in the `.changeset` directory. Each changeset is stored as
To add a changeset, use `changesets` to create it for you:

```bash
npx @changesets/cli
npm run changeset
```

This will kick off an interactive prompt to help you create the changeset. Use the arrow keys to navigate the different options, and press the `Space` key to select an option. You should select the package(s) you are making a change to – most of the time this will be `@coinbase/agentkit`. Once selected, hit `Enter`. You'll then be prompted to specify the type of change you are making (major, minor or patch), starting with major. Most of the time you will not be making a major change, so hitting `Enter` will progress to the next step. If you're adding a new feature, you should select `minor`. If you're fixing a bug, you should select `patch`. Once selected, you will be prompted to provide a summary of your changes. This should be a short, specific description in the past tense (see above for examples).
Expand Down
6 changes: 6 additions & 0 deletions typescript/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@
"packageManager": "npm@8.9.0",
"scripts": {
"build": "turbo run build",
"changeset": "changeset",
"changeset:publish": "npm ci && npm run build && changeset publish",
"changeset:version": "changeset version",
"test": "turbo run test",
"lint": "turbo run lint",
"clean": "turbo run clean",
Expand All @@ -34,6 +37,9 @@
"author": "Coinbase Inc.",
"license": "Apache-2.0",
"repository": "https://github.com/coinbase/agentkit",
"publishConfig": {
"provenance": true
},
"keywords": [
"coinbase",
"sdk",
Expand Down