Skip to content

Commit a34639b

Browse files
committed
merge: sync with upstream/main and resolve conflicts
2 parents a97266f + 09c7b03 commit a34639b

File tree

130 files changed

+6310
-3797
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

130 files changed

+6310
-3797
lines changed

.env.example

+4
Original file line numberDiff line numberDiff line change
@@ -185,3 +185,7 @@ WHATSAPP_API_VERSION=v17.0 # WhatsApp API version (default: v17.0)
185185
# ICP
186186
INTERNET_COMPUTER_PRIVATE_KEY=
187187
INTERNET_COMPUTER_ADDRESS=
188+
189+
# Aptos
190+
APTOS_PRIVATE_KEY= # Aptos private key
191+
APTOS_NETWORK= # must be one of mainnet, testnet

.github/workflows/release.yaml

+16-30
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,9 @@
11
name: Release
22

33
on:
4+
release:
5+
types: [created]
46
workflow_dispatch:
5-
inputs:
6-
release_type:
7-
description: "Type of release (prerelease, prepatch, patch, minor, preminor, major)"
8-
required: true
9-
default: "patch"
107

118
jobs:
129
release:
@@ -43,33 +40,22 @@ jobs:
4340
- name: Build packages
4441
run: pnpm run build
4542

46-
- name: Tag and Publish Packages
47-
id: tag_publish
43+
- name: Publish Packages
44+
id: publish
4845
run: |
49-
npx lerna version ${{ github.event.inputs.release_type }} --conventional-commits --yes --no-private --force-publish
50-
npx lerna publish from-git --yes --dist-tag ${{ github.event.inputs.release_type == 'preminor' && 'next' || 'latest' }}
46+
# Get the latest release tag
47+
LATEST_TAG=$(git describe --tags `git rev-list --tags --max-count=1`)
5148
52-
- name: Get Version Tag
53-
id: get_tag
54-
run: echo "TAG=$(git describe --tags --abbrev=0)" >> $GITHUB_OUTPUT
49+
# Force clean the working directory and reset any changes
50+
echo "Cleaning working directory and resetting any changes"
51+
git clean -fd
52+
git reset --hard HEAD
5553
56-
- name: Generate Release Body
57-
id: release_body
58-
run: |
59-
if [ -f CHANGELOG.md ]; then
60-
echo "body=$(cat CHANGELOG.md)" >> $GITHUB_OUTPUT
61-
else
62-
echo "body=No changelog provided for this release." >> $GITHUB_OUTPUT
63-
fi
54+
# Force checkout the latest tag
55+
echo "Checking out latest tag: $LATEST_TAG"
56+
git checkout -b temp-publish-branch $LATEST_TAG
6457
65-
- name: Create GitHub Release
66-
uses: actions/create-release@v1
58+
echo "Publishing version: $LATEST_TAG"
59+
npx lerna publish from-package --yes --dist-tag latest
6760
env:
68-
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
69-
PNPM_HOME: /home/runner/setup-pnpm/node_modules/.bin
70-
with:
71-
tag_name: ${{ steps.get_tag.outputs.TAG }}
72-
release_name: Release
73-
body_path: CHANGELOG.md
74-
draft: false
75-
prerelease: false
61+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

CHANGELOG.md

+266-4
Large diffs are not rendered by default.

Dockerfile

+46-21
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,55 @@
1-
FROM node:23.3.0
2-
RUN npm install -g pnpm@9.4.0
1+
# Use a specific Node.js version for better reproducibility
2+
FROM node:23.3.0-slim AS builder
3+
4+
# Install pnpm globally and install necessary build tools
5+
RUN npm install -g pnpm@9.4.0 && \
6+
apt-get update && \
7+
apt-get install -y git python3 make g++ && \
8+
apt-get clean && \
9+
rm -rf /var/lib/apt/lists/*
10+
11+
# Set Python 3 as the default python
12+
RUN ln -s /usr/bin/python3 /usr/bin/python
313

414
# Set the working directory
515
WORKDIR /app
616

7-
# Add configuration files and install dependencies
8-
ADD pnpm-workspace.yaml /app/pnpm-workspace.yaml
9-
ADD package.json /app/package.json
10-
ADD .npmrc /app/.npmrc
11-
ADD tsconfig.json /app/tsconfig.json
12-
ADD turbo.json /app/turbo.json
17+
# Copy package.json and other configuration files
18+
COPY package.json pnpm-lock.yaml pnpm-workspace.yaml .npmrc turbo.json ./
19+
20+
# Copy the rest of the application code
21+
COPY agent ./agent
22+
COPY packages ./packages
23+
COPY scripts ./scripts
24+
COPY characters ./characters
1325

14-
# Add the documentation
15-
ADD docs /app/docs
26+
# Install dependencies and build the project
27+
RUN pnpm install \
28+
&& pnpm build \
29+
&& pnpm prune --prod
1630

17-
# Add the rest of the application code
18-
ADD agent /app/agent
19-
ADD packages /app/packages
31+
# Create a new stage for the final image
32+
FROM node:23.3.0-slim
2033

21-
# Add the environment variables
22-
ADD scripts /app/scripts
23-
ADD characters /app/characters
24-
ADD .env /app/.env
34+
# Install runtime dependencies if needed
35+
RUN npm install -g pnpm@9.4.0 && \
36+
apt-get update && \
37+
apt-get install -y git python3 && \
38+
apt-get clean && \
39+
rm -rf /var/lib/apt/lists/*
40+
41+
WORKDIR /app
2542

26-
RUN pnpm i
27-
RUN pnpm build
43+
# Copy built artifacts and production dependencies from the builder stage
44+
COPY --from=builder /app/package.json ./
45+
COPY --from=builder /app/pnpm-workspace.yaml ./
46+
COPY --from=builder /app/.npmrc ./
47+
COPY --from=builder /app/turbo.json ./
48+
COPY --from=builder /app/node_modules ./node_modules
49+
COPY --from=builder /app/agent ./agent
50+
COPY --from=builder /app/packages ./packages
51+
COPY --from=builder /app/scripts ./scripts
52+
COPY --from=builder /app/characters ./characters
2853

29-
# Command to run the container
30-
CMD ["tail", "-f", "/dev/null"]
54+
# Set the command to run the application
55+
CMD ["pnpm", "start", "--non-interactive"]

0 commit comments

Comments
 (0)