Skip to content

Commit d5cf113

Browse files
learna an npm
1 parent 17215f0 commit d5cf113

File tree

25 files changed

+179
-0
lines changed

25 files changed

+179
-0
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

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
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)