Skip to content

Commit 03ecab8

Browse files
Merge pull request #428 from ai16z/release
feat: lerna an npm
2 parents 4154da2 + 817a410 commit 03ecab8

File tree

29 files changed

+1584
-466
lines changed

29 files changed

+1584
-466
lines changed

.github/workflows/release.yaml

+71
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
name: Release
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
release_type:
7+
description: "Type of release (prerelease, prepatch, patch, minor, preminor, major)"
8+
required: true
9+
default: "patch"
10+
11+
jobs:
12+
release:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v4
16+
with:
17+
fetch-depth: 0
18+
19+
- uses: pnpm/action-setup@v3
20+
with:
21+
version: 8
22+
23+
- name: Configure Git
24+
run: |
25+
git config user.name "${{ github.actor }}"
26+
git config user.email "${{ github.actor }}@users.noreply.github.com"
27+
28+
- name: "Setup npm for npmjs"
29+
run: |
30+
npm config set registry https://registry.npmjs.org/
31+
echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc
32+
33+
- name: Install Protobuf Compiler
34+
run: sudo apt-get install -y protobuf-compiler
35+
36+
- name: Install dependencies
37+
run: pnpm install
38+
39+
- name: Build packages
40+
run: pnpm run build
41+
42+
- name: Tag and Publish Packages
43+
id: tag_publish
44+
run: |
45+
npx lerna version ${{ github.event.inputs.release_type }} --conventional-commits --yes --no-private --force-publish
46+
npx lerna publish from-git --yes --dist-tag ${{ github.event.inputs.release_type == 'preminor' && 'next' || 'latest' }}
47+
48+
- name: Get Version Tag
49+
id: get_tag
50+
run: echo "TAG=$(git describe --tags --abbrev=0)" >> $GITHUB_OUTPUT
51+
52+
- name: Generate Release Body
53+
id: release_body
54+
run: |
55+
if [ -f CHANGELOG.md ]; then
56+
echo "body=$(cat CHANGELOG.md)" >> $GITHUB_OUTPUT
57+
else
58+
echo "body=No changelog provided for this release." >> $GITHUB_OUTPUT
59+
fi
60+
61+
- name: Create GitHub Release
62+
uses: actions/create-release@v1
63+
env:
64+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
65+
PNPM_HOME: /home/runner/setup-pnpm/node_modules/.bin
66+
with:
67+
tag_name: ${{ steps.get_tag.outputs.TAG }}
68+
release_name: Release
69+
body_path: CHANGELOG.md
70+
draft: false
71+
prerelease: false

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ sh scripts/start.sh
6161

6262
### Edit the character file
6363

64-
1. Open `packages/agent/src/character.ts` to modify the default character. Uncomment and edit.
64+
1. Open `agent/src/character.ts` to modify the default character. Uncomment and edit.
6565

6666
2. To load custom characters:
6767
- Use `pnpm start --characters="path/to/your/character.json"`
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

packages/agent/tsconfig.json agent/tsconfig.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"extends": "../../tsconfig.json",
2+
"extends": "../tsconfig.json",
33
"compilerOptions": {
44
"outDir": "dist",
55
"rootDir": ".",

lerna.json

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"version": "0.1.0",
3+
"packages": ["packages/*"],
4+
"npmClient": "pnpm"
5+
}

package.json

+1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
"lint": "pnpm --dir packages/core lint && pnpm --dir packages/agent lint",
1414
"prettier-check": "npx prettier --check .",
1515
"prettier": "npx prettier --write .",
16+
"release": "pnpm build && pnpm prettier && npx lerna publish --no-private --force-publish",
1617
"clean": "bash ./scripts/clean.sh",
1718
"docker:build": "bash ./scripts/docker.sh build",
1819
"docker:run": "bash ./scripts/docker.sh run",

packages/adapter-postgres/.npmignore

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
*
2+
3+
!dist/**
4+
!package.json
5+
!readme.md
6+
!tsup.config.ts

packages/adapter-sqlite/.npmignore

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
*
2+
3+
!dist/**
4+
!package.json
5+
!readme.md
6+
!tsup.config.ts

packages/adapter-sqljs/.npmignore

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
*
2+
3+
!dist/**
4+
!package.json
5+
!readme.md
6+
!tsup.config.ts

packages/adapter-supabase/.npmignore

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
*
2+
3+
!dist/**
4+
!package.json
5+
!readme.md
6+
!tsup.config.ts

packages/client-auto/.npmignore

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
*
2+
3+
!dist/**
4+
!package.json
5+
!readme.md
6+
!tsup.config.ts

packages/client-direct/.npmignore

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
*
2+
3+
!dist/**
4+
!package.json
5+
!readme.md
6+
!tsup.config.ts

packages/client-discord/.npmignore

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
*
2+
3+
!dist/**
4+
!package.json
5+
!readme.md
6+
!tsup.config.ts

packages/client-telegram/.npmignore

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
*
2+
3+
!dist/**
4+
!package.json
5+
!readme.md
6+
!tsup.config.ts

packages/client-twitter/.npmignore

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
*
2+
3+
!dist/**
4+
!package.json
5+
!readme.md
6+
!tsup.config.ts

packages/core/.npmignore

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
*
2+
3+
!dist/**
4+
!package.json
5+
!readme.md
6+
!tsup.config.ts

packages/plugin-bootstrap/.npmignore

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
*
2+
3+
!dist/**
4+
!package.json
5+
!readme.md
6+
!tsup.config.ts
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
*
2+
3+
!dist/**
4+
!package.json
5+
!readme.md
6+
!tsup.config.ts

packages/plugin-node/.npmignore

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
*
2+
3+
!dist/**
4+
!package.json
5+
!readme.md
6+
!tsup.config.ts

packages/plugin-solana/.npmignore

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
*
2+
3+
!dist/**
4+
!package.json
5+
!readme.md
6+
!tsup.config.ts

packages/plugin-starknet/.npmignore

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
*
2+
3+
!dist/**
4+
!package.json
5+
!readme.md
6+
!tsup.config.ts

packages/plugin-trustdb/.npmignore

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
*
2+
3+
!dist/**
4+
!package.json
5+
!readme.md
6+
!tsup.config.ts

packages/plugin-trustdb/package.json

+5-1
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,16 @@
88
"@ai16z/eliza": "workspace:*",
99
"tsup": "^8.3.5",
1010
"uuid": "11.0.2",
11-
"vitest": "^2.1.4"
11+
"vitest": "^2.1.4",
12+
"dompurify": "3.2.0"
1213
},
1314
"scripts": {
1415
"build": "tsup --format esm --dts",
1516
"test": "vitest"
1617
},
18+
"devDependencies": {
19+
"@types/dompurify": "^3.2.0"
20+
},
1721
"peerDependencies": {
1822
"whatwg-url": "7.1.0"
1923
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
*
2+
3+
!dist/**
4+
!package.json
5+
!readme.md
6+
!tsup.config.ts

0 commit comments

Comments
 (0)