Skip to content

Commit

Permalink
merge: sync with upstream/main and resolve conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
AIFlowML committed Dec 5, 2024
2 parents a97266f + 09c7b03 commit a34639b
Show file tree
Hide file tree
Showing 130 changed files with 6,310 additions and 3,797 deletions.
4 changes: 4 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -185,3 +185,7 @@ WHATSAPP_API_VERSION=v17.0 # WhatsApp API version (default: v17.0)
# ICP
INTERNET_COMPUTER_PRIVATE_KEY=
INTERNET_COMPUTER_ADDRESS=

# Aptos
APTOS_PRIVATE_KEY= # Aptos private key
APTOS_NETWORK= # must be one of mainnet, testnet
46 changes: 16 additions & 30 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
name: Release

on:
release:
types: [created]
workflow_dispatch:
inputs:
release_type:
description: "Type of release (prerelease, prepatch, patch, minor, preminor, major)"
required: true
default: "patch"

jobs:
release:
Expand Down Expand Up @@ -43,33 +40,22 @@ jobs:
- name: Build packages
run: pnpm run build

- name: Tag and Publish Packages
id: tag_publish
- name: Publish Packages
id: publish
run: |
npx lerna version ${{ github.event.inputs.release_type }} --conventional-commits --yes --no-private --force-publish
npx lerna publish from-git --yes --dist-tag ${{ github.event.inputs.release_type == 'preminor' && 'next' || 'latest' }}
# Get the latest release tag
LATEST_TAG=$(git describe --tags `git rev-list --tags --max-count=1`)
- name: Get Version Tag
id: get_tag
run: echo "TAG=$(git describe --tags --abbrev=0)" >> $GITHUB_OUTPUT
# Force clean the working directory and reset any changes
echo "Cleaning working directory and resetting any changes"
git clean -fd
git reset --hard HEAD
- name: Generate Release Body
id: release_body
run: |
if [ -f CHANGELOG.md ]; then
echo "body=$(cat CHANGELOG.md)" >> $GITHUB_OUTPUT
else
echo "body=No changelog provided for this release." >> $GITHUB_OUTPUT
fi
# Force checkout the latest tag
echo "Checking out latest tag: $LATEST_TAG"
git checkout -b temp-publish-branch $LATEST_TAG
- name: Create GitHub Release
uses: actions/create-release@v1
echo "Publishing version: $LATEST_TAG"
npx lerna publish from-package --yes --dist-tag latest
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
PNPM_HOME: /home/runner/setup-pnpm/node_modules/.bin
with:
tag_name: ${{ steps.get_tag.outputs.TAG }}
release_name: Release
body_path: CHANGELOG.md
draft: false
prerelease: false
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
270 changes: 266 additions & 4 deletions CHANGELOG.md

Large diffs are not rendered by default.

67 changes: 46 additions & 21 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,30 +1,55 @@
FROM node:23.3.0
RUN npm install -g [email protected]
# Use a specific Node.js version for better reproducibility
FROM node:23.3.0-slim AS builder

# Install pnpm globally and install necessary build tools
RUN npm install -g [email protected] && \
apt-get update && \
apt-get install -y git python3 make g++ && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*

# Set Python 3 as the default python
RUN ln -s /usr/bin/python3 /usr/bin/python

# Set the working directory
WORKDIR /app

# Add configuration files and install dependencies
ADD pnpm-workspace.yaml /app/pnpm-workspace.yaml
ADD package.json /app/package.json
ADD .npmrc /app/.npmrc
ADD tsconfig.json /app/tsconfig.json
ADD turbo.json /app/turbo.json
# Copy package.json and other configuration files
COPY package.json pnpm-lock.yaml pnpm-workspace.yaml .npmrc turbo.json ./

# Copy the rest of the application code
COPY agent ./agent
COPY packages ./packages
COPY scripts ./scripts
COPY characters ./characters

# Add the documentation
ADD docs /app/docs
# Install dependencies and build the project
RUN pnpm install \
&& pnpm build \
&& pnpm prune --prod

# Add the rest of the application code
ADD agent /app/agent
ADD packages /app/packages
# Create a new stage for the final image
FROM node:23.3.0-slim

# Add the environment variables
ADD scripts /app/scripts
ADD characters /app/characters
ADD .env /app/.env
# Install runtime dependencies if needed
RUN npm install -g [email protected] && \
apt-get update && \
apt-get install -y git python3 && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*

WORKDIR /app

RUN pnpm i
RUN pnpm build
# Copy built artifacts and production dependencies from the builder stage
COPY --from=builder /app/package.json ./
COPY --from=builder /app/pnpm-workspace.yaml ./
COPY --from=builder /app/.npmrc ./
COPY --from=builder /app/turbo.json ./
COPY --from=builder /app/node_modules ./node_modules
COPY --from=builder /app/agent ./agent
COPY --from=builder /app/packages ./packages
COPY --from=builder /app/scripts ./scripts
COPY --from=builder /app/characters ./characters

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

0 comments on commit a34639b

Please sign in to comment.