mirror of
https://github.com/langchain-ai/deepagentsjs.git
synced 2026-07-25 21:06:29 -04:00
6a40f93bd4
Bumps [pnpm/action-setup](https://github.com/pnpm/action-setup) from 5.0.0 to 6.0.5. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/pnpm/action-setup/releases">pnpm/action-setup's releases</a>.</em></p> <blockquote> <h2>v6.0.5</h2> <h2>What's Changed</h2> <ul> <li>fix: append (not prepend) action node dir to PATH for npm bootstrap by <a href="https://github.com/zkochan"><code>@zkochan</code></a> in <a href="https://redirect.github.com/pnpm/action-setup/pull/241">pnpm/action-setup#241</a></li> </ul> <p><strong>Full Changelog</strong>: <a href="https://github.com/pnpm/action-setup/compare/v6.0.4...v6.0.5">https://github.com/pnpm/action-setup/compare/v6.0.4...v6.0.5</a></p> <h2>v6.0.4</h2> <h2>What's Changed</h2> <ul> <li>fix: use npm co-located with the action node binary by <a href="https://github.com/benquarmby"><code>@benquarmby</code></a> in <a href="https://redirect.github.com/pnpm/action-setup/pull/239">pnpm/action-setup#239</a></li> </ul> <h2>New Contributors</h2> <ul> <li><a href="https://github.com/benquarmby"><code>@benquarmby</code></a> made their first contribution in <a href="https://redirect.github.com/pnpm/action-setup/pull/239">pnpm/action-setup#239</a></li> </ul> <p><strong>Full Changelog</strong>: <a href="https://github.com/pnpm/action-setup/compare/v6.0.3...v6.0.4">https://github.com/pnpm/action-setup/compare/v6.0.3...v6.0.4</a></p> <h2>v6.0.3</h2> <p>Updated pnpm to v11.0.0-rc.5</p> <p><strong>Full Changelog</strong>: <a href="https://github.com/pnpm/action-setup/compare/v6.0.2...v6.0.3">https://github.com/pnpm/action-setup/compare/v6.0.2...v6.0.3</a></p> <h2>v6.0.2</h2> <h2>What's Changed</h2> <ul> <li>fix: pnpm self-update binary shadowed by bootstrap on PATH by <a href="https://github.com/oniani1"><code>@oniani1</code></a> in <a href="https://redirect.github.com/pnpm/action-setup/pull/230">pnpm/action-setup#230</a></li> </ul> <h2>New Contributors</h2> <ul> <li><a href="https://github.com/oniani1"><code>@oniani1</code></a> made their first contribution in <a href="https://redirect.github.com/pnpm/action-setup/pull/230">pnpm/action-setup#230</a></li> </ul> <p><strong>Full Changelog</strong>: <a href="https://github.com/pnpm/action-setup/compare/v6.0.1...v6.0.2">https://github.com/pnpm/action-setup/compare/v6.0.1...v6.0.2</a></p> <h2>v6.0.1</h2> <p>Update pnpm to v11.0.0-rc.2. <code>pnpm-lock.yaml</code> will not be saved with two documents unless the <code>packageManager</code> is set via <code>devEngines.packageManager</code>. Related issue: <a href="https://redirect.github.com/pnpm/action-setup/issues/228">pnpm/action-setup#228</a></p> <h2>v6.0.0</h2> <p>Added support for pnpm <a href="https://github.com/pnpm/pnpm/releases/tag/v11.0.0-rc.0">v11</a>.</p> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/pnpm/action-setup/commit/8912a9102ac27614460f54aedde9e1e7f9aec20d"><code>8912a91</code></a> fix: append (not prepend) action node dir to PATH for npm bootstrap (<a href="https://redirect.github.com/pnpm/action-setup/issues/241">#241</a>)</li> <li><a href="https://github.com/pnpm/action-setup/commit/26f6d4f2c533a43e6b5da0b4a5dd983f98f7b49a"><code>26f6d4f</code></a> fix: use npm co-located with the action node binary (<a href="https://redirect.github.com/pnpm/action-setup/issues/239">#239</a>)</li> <li><a href="https://github.com/pnpm/action-setup/commit/903f9c1a6ebcba6cf41d87230be49611ac97822e"><code>903f9c1</code></a> fix: update pnpm to 11.0.0-rc.5</li> <li><a href="https://github.com/pnpm/action-setup/commit/bdf0af2a9d539c0fd91f655344d2934bfd5a2cdd"><code>bdf0af2</code></a> test: add strict version-match jobs to reproduce <a href="https://redirect.github.com/pnpm/action-setup/issues/225">#225</a> / <a href="https://redirect.github.com/pnpm/action-setup/issues/227">#227</a></li> <li><a href="https://github.com/pnpm/action-setup/commit/71c92474e7e4f5bca283fb17ef80fba9cdb2b4b1"><code>71c9247</code></a> fix: pnpm self-update binary shadowed by bootstrap on PATH (<a href="https://redirect.github.com/pnpm/action-setup/issues/230">#230</a>)</li> <li><a href="https://github.com/pnpm/action-setup/commit/078e9d416474b29c0c387560859308974f7e9c53"><code>078e9d4</code></a> fix: update pnpm to 11.0.0-rc.2</li> <li><a href="https://github.com/pnpm/action-setup/commit/08c4be7e2e672a47d11bd04269e27e5f3e8529cb"><code>08c4be7</code></a> docs(README): update action-setup version</li> <li><a href="https://github.com/pnpm/action-setup/commit/579891461a117d7c030d0430bbc772562374d9e1"><code>5798914</code></a> chore: update .gitignore</li> <li><a href="https://github.com/pnpm/action-setup/commit/ddffd667542d33325b6f1d9bda9cfcc7861fc400"><code>ddffd66</code></a> fix: remove accidentally committed file</li> <li><a href="https://github.com/pnpm/action-setup/commit/b43f991918ce53332dce4c15c32ae14261d12d65"><code>b43f991</code></a> fix: update pnpm to 11.0.0-rc.0</li> <li>Additional commits viewable in <a href="https://github.com/pnpm/action-setup/compare/v5...v6.0.5">compare view</a></li> </ul> </details> <br /> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
333 lines
12 KiB
YAML
333 lines
12 KiB
YAML
# CLI Release Workflow
|
|
#
|
|
# This workflow builds and publishes the deepagents-cli npm package.
|
|
# It wraps the Python deepagents-cli from PyPI as platform-specific binaries.
|
|
#
|
|
# Triggers:
|
|
# - Manual dispatch with optional version override
|
|
# - Daily schedule to check for new PyPI releases
|
|
#
|
|
# Jobs:
|
|
# 1. check-version: Determine if a new build is needed
|
|
# 2. build: Build binaries for each platform (matrix)
|
|
# 3. publish: Publish all packages to npm
|
|
|
|
name: CLI Release
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
inputs:
|
|
version:
|
|
description: "Version to build (leave empty for latest from PyPI)"
|
|
required: false
|
|
type: string
|
|
dry_run:
|
|
description: "Dry run (skip publishing)"
|
|
required: false
|
|
type: boolean
|
|
default: false
|
|
schedule:
|
|
# Check for new PyPI releases daily at 6:00 AM UTC
|
|
- cron: "0 6 * * *"
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
# Ensure only one release workflow runs at a time
|
|
concurrency:
|
|
group: cli-release
|
|
cancel-in-progress: false
|
|
|
|
jobs:
|
|
# ==========================================================================
|
|
# Job 1: Check if a new version needs to be built
|
|
# ==========================================================================
|
|
check-version:
|
|
name: Check Version
|
|
runs-on: ubuntu-latest
|
|
outputs:
|
|
should_build: ${{ steps.check.outputs.should_build }}
|
|
version: ${{ steps.check.outputs.version }}
|
|
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
|
|
|
|
- name: Check for new version
|
|
id: check
|
|
run: |
|
|
set -e
|
|
|
|
# Get latest PyPI version
|
|
echo "Fetching latest version from PyPI..."
|
|
PYPI_VERSION=$(curl -s https://pypi.org/pypi/deepagents-cli/json | jq -r '.info.version')
|
|
echo "PyPI version: $PYPI_VERSION"
|
|
|
|
# Get current npm version (may not exist yet)
|
|
echo "Checking npm version..."
|
|
NPM_VERSION=$(npm view deepagents-cli version 2>/dev/null || echo "0.0.0")
|
|
echo "npm version: $NPM_VERSION"
|
|
|
|
# Manual override takes precedence
|
|
if [ -n "${{ github.event.inputs.version }}" ]; then
|
|
VERSION="${{ github.event.inputs.version }}"
|
|
echo "Using manual version override: $VERSION"
|
|
echo "version=$VERSION" >> $GITHUB_OUTPUT
|
|
echo "should_build=true" >> $GITHUB_OUTPUT
|
|
elif [ "$PYPI_VERSION" != "$NPM_VERSION" ]; then
|
|
echo "New version available: $PYPI_VERSION (current: $NPM_VERSION)"
|
|
echo "version=$PYPI_VERSION" >> $GITHUB_OUTPUT
|
|
echo "should_build=true" >> $GITHUB_OUTPUT
|
|
else
|
|
echo "No new version available"
|
|
echo "version=$PYPI_VERSION" >> $GITHUB_OUTPUT
|
|
echo "should_build=false" >> $GITHUB_OUTPUT
|
|
fi
|
|
|
|
- name: Summary
|
|
run: |
|
|
echo "### Version Check Results" >> $GITHUB_STEP_SUMMARY
|
|
echo "" >> $GITHUB_STEP_SUMMARY
|
|
echo "| Property | Value |" >> $GITHUB_STEP_SUMMARY
|
|
echo "|----------|-------|" >> $GITHUB_STEP_SUMMARY
|
|
echo "| Version | ${{ steps.check.outputs.version }} |" >> $GITHUB_STEP_SUMMARY
|
|
echo "| Should Build | ${{ steps.check.outputs.should_build }} |" >> $GITHUB_STEP_SUMMARY
|
|
|
|
# ==========================================================================
|
|
# Job 2: Build binaries for each platform
|
|
# ==========================================================================
|
|
build:
|
|
name: Build (${{ matrix.platform }})
|
|
needs: check-version
|
|
if: needs.check-version.outputs.should_build == 'true'
|
|
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
include:
|
|
- platform: linux-x64
|
|
os: ubuntu-latest
|
|
python-version: "3.11"
|
|
- platform: linux-arm64
|
|
os: ubuntu-24.04-arm
|
|
python-version: "3.11"
|
|
- platform: darwin-x64
|
|
os: macos-13
|
|
python-version: "3.11"
|
|
- platform: darwin-arm64
|
|
os: macos-14
|
|
python-version: "3.11"
|
|
- platform: win32-x64
|
|
os: windows-latest
|
|
python-version: "3.11"
|
|
|
|
runs-on: ${{ matrix.os }}
|
|
timeout-minutes: 30
|
|
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v6
|
|
|
|
- name: Setup Python
|
|
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
|
|
with:
|
|
python-version: ${{ matrix.python-version }}
|
|
|
|
- name: Setup Node.js
|
|
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
|
|
with:
|
|
node-version: "22"
|
|
|
|
- name: Setup pnpm
|
|
uses: pnpm/action-setup@e578e19d19d31b011b841ba2aca34731a5f706a5 # v5.0.0
|
|
|
|
- name: Install dependencies
|
|
run: pnpm install
|
|
working-directory: libs/cli
|
|
|
|
- name: Build CLI binary
|
|
run: |
|
|
pnpm run build:cli \
|
|
--platform ${{ matrix.platform }} \
|
|
--version ${{ needs.check-version.outputs.version }}
|
|
working-directory: libs/cli
|
|
env:
|
|
# Increase Node.js heap size for PyInstaller
|
|
NODE_OPTIONS: "--max-old-space-size=4096"
|
|
|
|
- name: List build output
|
|
run: |
|
|
echo "Build output:"
|
|
ls -la dist/platforms/${{ matrix.platform }}/ || true
|
|
ls -la dist/platforms/${{ matrix.platform }}/bin/ || true
|
|
working-directory: libs/cli
|
|
shell: bash
|
|
|
|
- name: Upload platform package
|
|
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
|
|
with:
|
|
name: cli-${{ matrix.platform }}
|
|
path: libs/cli/dist/platforms/${{ matrix.platform }}/
|
|
retention-days: 7
|
|
if-no-files-found: error
|
|
|
|
# ==========================================================================
|
|
# Job 3: Publish all packages to npm
|
|
# ==========================================================================
|
|
publish:
|
|
name: Publish to npm
|
|
needs: [check-version, build]
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 15
|
|
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
|
|
|
|
- name: Setup Node.js
|
|
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
|
|
with:
|
|
node-version: "22"
|
|
registry-url: "https://registry.npmjs.org"
|
|
|
|
- name: Setup pnpm
|
|
uses: pnpm/action-setup@e578e19d19d31b011b841ba2aca34731a5f706a5 # v5.0.0
|
|
|
|
- name: Download all platform packages
|
|
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
|
|
with:
|
|
path: libs/cli/dist/platforms/
|
|
pattern: cli-*
|
|
merge-multiple: true
|
|
|
|
- name: List downloaded artifacts
|
|
run: |
|
|
echo "Downloaded artifacts:"
|
|
find libs/cli/dist/platforms -type f | head -50
|
|
|
|
- name: Install dependencies
|
|
run: pnpm install
|
|
working-directory: libs/cli
|
|
|
|
- name: Build main package
|
|
run: pnpm run build
|
|
working-directory: libs/cli
|
|
|
|
- name: Update versions
|
|
run: |
|
|
VERSION="${{ needs.check-version.outputs.version }}"
|
|
echo "Setting version to $VERSION"
|
|
|
|
# Update main package version
|
|
cd libs/cli
|
|
npm version "$VERSION" --no-git-tag-version --allow-same-version
|
|
|
|
# Update platform package versions
|
|
for platform in linux-x64 linux-arm64 darwin-x64 darwin-arm64 win32-x64; do
|
|
if [ -d "dist/platforms/$platform" ]; then
|
|
echo "Updating $platform to version $VERSION"
|
|
cd "dist/platforms/$platform"
|
|
npm version "$VERSION" --no-git-tag-version --allow-same-version
|
|
cd - > /dev/null
|
|
else
|
|
echo "Warning: Platform $platform not found"
|
|
fi
|
|
done
|
|
|
|
- name: Publish platform packages
|
|
if: ${{ github.event.inputs.dry_run != 'true' }}
|
|
run: |
|
|
for platform in linux-x64 linux-arm64 darwin-x64 darwin-arm64 win32-x64; do
|
|
if [ -d "libs/cli/dist/platforms/$platform" ]; then
|
|
echo "Publishing @deepagents-cli/$platform..."
|
|
cd "libs/cli/dist/platforms/$platform"
|
|
|
|
# Try to publish, continue on error (may already exist)
|
|
npm publish --access public || echo "Warning: Failed to publish $platform (may already exist)"
|
|
|
|
cd - > /dev/null
|
|
fi
|
|
done
|
|
env:
|
|
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
|
|
- name: Publish main package
|
|
if: ${{ github.event.inputs.dry_run != 'true' }}
|
|
run: |
|
|
echo "Publishing deepagents-cli..."
|
|
npm publish --access public
|
|
working-directory: libs/cli
|
|
env:
|
|
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
|
|
- name: Dry run summary
|
|
if: ${{ github.event.inputs.dry_run == 'true' }}
|
|
run: |
|
|
echo "### Dry Run - Would have published:" >> $GITHUB_STEP_SUMMARY
|
|
echo "" >> $GITHUB_STEP_SUMMARY
|
|
echo "- deepagents-cli@${{ needs.check-version.outputs.version }}" >> $GITHUB_STEP_SUMMARY
|
|
for platform in linux-x64 linux-arm64 darwin-x64 darwin-arm64 win32-x64; do
|
|
echo "- @deepagents-cli/$platform@${{ needs.check-version.outputs.version }}" >> $GITHUB_STEP_SUMMARY
|
|
done
|
|
|
|
- name: Publish summary
|
|
if: ${{ github.event.inputs.dry_run != 'true' }}
|
|
run: |
|
|
echo "### Published Packages" >> $GITHUB_STEP_SUMMARY
|
|
echo "" >> $GITHUB_STEP_SUMMARY
|
|
echo "Version: ${{ needs.check-version.outputs.version }}" >> $GITHUB_STEP_SUMMARY
|
|
echo "" >> $GITHUB_STEP_SUMMARY
|
|
echo "| Package | Status |" >> $GITHUB_STEP_SUMMARY
|
|
echo "|---------|--------|" >> $GITHUB_STEP_SUMMARY
|
|
echo "| deepagents-cli | ✅ Published |" >> $GITHUB_STEP_SUMMARY
|
|
for platform in linux-x64 linux-arm64 darwin-x64 darwin-arm64 win32-x64; do
|
|
echo "| @deepagents-cli/$platform | ✅ Published |" >> $GITHUB_STEP_SUMMARY
|
|
done
|
|
|
|
# ==========================================================================
|
|
# Job 4: Create GitHub Release (optional)
|
|
# ==========================================================================
|
|
release:
|
|
name: Create Release
|
|
needs: [check-version, publish]
|
|
if: ${{ github.event.inputs.dry_run != 'true' }}
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
|
|
|
|
- name: Create Release
|
|
uses: softprops/action-gh-release@b4309332981a82ec1c5618f44dd2e27cc8bfbfda # v3.0.0
|
|
with:
|
|
tag_name: cli-v${{ needs.check-version.outputs.version }}
|
|
name: deepagents-cli v${{ needs.check-version.outputs.version }}
|
|
body: |
|
|
## deepagents-cli v${{ needs.check-version.outputs.version }}
|
|
|
|
This release wraps [deepagents-cli ${{ needs.check-version.outputs.version }}](https://pypi.org/project/deepagents-cli/${{ needs.check-version.outputs.version }}/) from PyPI.
|
|
|
|
### Installation
|
|
|
|
```bash
|
|
npm install -g deepagents-cli
|
|
```
|
|
|
|
### Supported Platforms
|
|
|
|
- Linux x64
|
|
- Linux ARM64
|
|
- macOS Intel (x64)
|
|
- macOS Apple Silicon (ARM64)
|
|
- Windows x64
|
|
|
|
### Links
|
|
|
|
- [npm package](https://www.npmjs.com/package/deepagents-cli)
|
|
- [PyPI package](https://pypi.org/project/deepagents-cli/)
|
|
- [Documentation](https://github.com/langchain-ai/deepagentsjs/tree/main/libs/cli)
|
|
draft: false
|
|
prerelease: false
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|