feat: letta code
This commit is contained in:
52
.github/workflows/release.yml
vendored
Normal file
52
.github/workflows/release.yml
vendored
Normal file
@@ -0,0 +1,52 @@
|
||||
name: Release
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
tag:
|
||||
description: "Optional tag (e.g. v0.1.2). Leave blank when running from a tag push."
|
||||
required: false
|
||||
push:
|
||||
tags:
|
||||
- "v*"
|
||||
|
||||
jobs:
|
||||
publish:
|
||||
runs-on: ubuntu-latest
|
||||
environment: npm-publish
|
||||
permissions:
|
||||
contents: read
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup Bun
|
||||
uses: oven-sh/setup-bun@v1
|
||||
with:
|
||||
bun-version: 1.3.0
|
||||
|
||||
- name: Install dependencies
|
||||
run: bun install
|
||||
|
||||
- name: Verify tag matches package version
|
||||
if: startsWith(github.ref, 'refs/tags/')
|
||||
run: |
|
||||
PKG_VERSION=$(jq -r '.version' package.json)
|
||||
TAG_VERSION=${GITHUB_REF#refs/tags/}
|
||||
if [ "v${PKG_VERSION}" != "${TAG_VERSION}" ]; then
|
||||
echo "Tag (${TAG_VERSION}) does not match package.json version (v${PKG_VERSION})."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
- name: Build binary
|
||||
run: bun run build
|
||||
|
||||
- name: Integration smoke test (real API)
|
||||
env:
|
||||
LETTA_API_KEY: ${{ secrets.LETTA_API_KEY }}
|
||||
run: ./bin/letta --prompt "ping" --tools "" --permission-mode plan
|
||||
|
||||
- name: Publish to npm
|
||||
env:
|
||||
NPM_CONFIG_TOKEN: ${{ secrets.NPM_TOKEN }}
|
||||
run: bun publish --access public --no-git-checks
|
||||
Reference in New Issue
Block a user