diff --git a/.github/workflows/create-release.yml b/.github/workflows/create-release.yml index f6f2592..4181d0a 100644 --- a/.github/workflows/create-release.yml +++ b/.github/workflows/create-release.yml @@ -82,126 +82,126 @@ jobs: env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - name: Generate changelog with git-cliff - if: steps.check-release.outputs.should_release == 'true' - uses: orhun/git-cliff-action@v4 - id: git-cliff - with: - config: cliff.toml - args: --tag "${{ steps.find-tags.outputs.latest_tag }}" --strip header --strip footer --verbose - env: - OUTPUT: current_changelog.md - GITHUB_REPO: ${{ github.repository }} + # - name: Generate changelog with git-cliff + # if: steps.check-release.outputs.should_release == 'true' + # uses: orhun/git-cliff-action@v4 + # id: git-cliff + # with: + # config: cliff.toml + # args: --tag "${{ steps.find-tags.outputs.latest_tag }}" --strip header --strip footer --verbose + # env: + # OUTPUT: current_changelog.md + # GITHUB_REPO: ${{ github.repository }} - - name: Process changelog and create fallback if needed - if: steps.check-release.outputs.should_release == 'true' - id: changelog - run: | - echo "📝 Processing changelog for v${{ steps.find-tags.outputs.version }}..." + # - name: Process changelog and create fallback if needed + # if: steps.check-release.outputs.should_release == 'true' + # id: changelog + # run: | + # echo "📝 Processing changelog for v${{ steps.find-tags.outputs.version }}..." - # Check if git-cliff generated content - if [ -s "current_changelog.md" ] && [ $(wc -l < current_changelog.md) -gt 2 ]; then - echo "✅ Git-cliff generated changelog successfully" - CHANGELOG_CONTENT=$(cat current_changelog.md) - else - echo "⚠️ Git-cliff output was minimal, creating fallback changelog" + # # Check if git-cliff generated content + # if [ -s "current_changelog.md" ] && [ $(wc -l < current_changelog.md) -gt 2 ]; then + # echo "✅ Git-cliff generated changelog successfully" + # CHANGELOG_CONTENT=$(cat current_changelog.md) + # else + # echo "⚠️ Git-cliff output was minimal, creating fallback changelog" - # Find the last tag to show range - LAST_TAG=$(git describe --tags --abbrev=0 ${{ steps.find-tags.outputs.latest_tag }}^ 2>/dev/null || echo "") + # # Find the last tag to show range + # LAST_TAG=$(git describe --tags --abbrev=0 ${{ steps.find-tags.outputs.latest_tag }}^ 2>/dev/null || echo "") - if [ -n "$LAST_TAG" ]; then - echo "📍 Generating changelog for range: $LAST_TAG → ${{ steps.find-tags.outputs.latest_tag }}" - COMMIT_COUNT=$(git rev-list --count $LAST_TAG..${{ steps.find-tags.outputs.latest_tag }}) - echo "📊 Found $COMMIT_COUNT commits since $LAST_TAG" + # if [ -n "$LAST_TAG" ]; then + # echo "📍 Generating changelog for range: $LAST_TAG → ${{ steps.find-tags.outputs.latest_tag }}" + # COMMIT_COUNT=$(git rev-list --count $LAST_TAG..${{ steps.find-tags.outputs.latest_tag }}) + # echo "📊 Found $COMMIT_COUNT commits since $LAST_TAG" - echo "## What's Changed" > current_changelog.md - echo "" >> current_changelog.md + # echo "## What's Changed" > current_changelog.md + # echo "" >> current_changelog.md - # Categorize commits - echo "### ✨ Features" >> current_changelog.md - git log --pretty=format:"- %s" $LAST_TAG..${{ steps.find-tags.outputs.latest_tag }} | grep -i "^feat" | sed 's/^feat[:(]//' | sed 's/^feat: //' >> current_changelog.md || echo "- No new features" >> current_changelog.md - echo "" >> current_changelog.md + # # Categorize commits + # echo "### ✨ Features" >> current_changelog.md + # git log --pretty=format:"- %s" $LAST_TAG..${{ steps.find-tags.outputs.latest_tag }} | grep -i "^feat" | sed 's/^feat[:(]//' | sed 's/^feat: //' >> current_changelog.md || echo "- No new features" >> current_changelog.md + # echo "" >> current_changelog.md - echo "### 🐛 Bug Fixes" >> current_changelog.md - git log --pretty=format:"- %s" $LAST_TAG..${{ steps.find-tags.outputs.latest_tag }} | grep -i "^fix" | sed 's/^fix[:(]//' | sed 's/^fix: //' >> current_changelog.md || echo "- No bug fixes" >> current_changelog.md - echo "" >> current_changelog.md + # echo "### 🐛 Bug Fixes" >> current_changelog.md + # git log --pretty=format:"- %s" $LAST_TAG..${{ steps.find-tags.outputs.latest_tag }} | grep -i "^fix" | sed 's/^fix[:(]//' | sed 's/^fix: //' >> current_changelog.md || echo "- No bug fixes" >> current_changelog.md + # echo "" >> current_changelog.md - echo "### 📚 Documentation" >> current_changelog.md - git log --pretty=format:"- %s" $LAST_TAG..${{ steps.find-tags.outputs.latest_tag }} | grep -i "^docs" | sed 's/^docs[:(]//' | sed 's/^docs: //' >> current_changelog.md || echo "- No documentation changes" >> current_changelog.md - echo "" >> current_changelog.md + # echo "### 📚 Documentation" >> current_changelog.md + # git log --pretty=format:"- %s" $LAST_TAG..${{ steps.find-tags.outputs.latest_tag }} | grep -i "^docs" | sed 's/^docs[:(]//' | sed 's/^docs: //' >> current_changelog.md || echo "- No documentation changes" >> current_changelog.md + # echo "" >> current_changelog.md - echo "### Other Changes" >> current_changelog.md - git log --pretty=format:"- %s" $LAST_TAG..${{ steps.find-tags.outputs.latest_tag }} | grep -v -i "^\(feat\|fix\|docs\)" >> current_changelog.md || echo "- No other changes" >> current_changelog.md - else - echo "📍 No previous tags found - generating changelog for initial release" - echo "## Initial Release" > current_changelog.md - echo "" >> current_changelog.md - echo "🎉 First release of RunAgent Universal AI Agent Platform!" >> current_changelog.md - echo "" >> current_changelog.md - echo "### Features" >> current_changelog.md - echo "- Universal AI agent platform supporting multiple languages" >> current_changelog.md - echo "- Python, JavaScript, Rust, and Go SDKs" >> current_changelog.md - echo "- Framework-agnostic agent deployment" >> current_changelog.md - echo "- Real-time streaming support" >> current_changelog.md - fi + # echo "### Other Changes" >> current_changelog.md + # git log --pretty=format:"- %s" $LAST_TAG..${{ steps.find-tags.outputs.latest_tag }} | grep -v -i "^\(feat\|fix\|docs\)" >> current_changelog.md || echo "- No other changes" >> current_changelog.md + # else + # echo "📍 No previous tags found - generating changelog for initial release" + # echo "## Initial Release" > current_changelog.md + # echo "" >> current_changelog.md + # echo "🎉 First release of RunAgent Universal AI Agent Platform!" >> current_changelog.md + # echo "" >> current_changelog.md + # echo "### Features" >> current_changelog.md + # echo "- Universal AI agent platform supporting multiple languages" >> current_changelog.md + # echo "- Python, JavaScript, Rust, and Go SDKs" >> current_changelog.md + # echo "- Framework-agnostic agent deployment" >> current_changelog.md + # echo "- Real-time streaming support" >> current_changelog.md + # fi - CHANGELOG_CONTENT=$(cat current_changelog.md) - fi + # CHANGELOG_CONTENT=$(cat current_changelog.md) + # fi - # Save changelog content for use in release body - echo "changelog<> $GITHUB_OUTPUT - echo "$CHANGELOG_CONTENT" >> $GITHUB_OUTPUT - echo "EOF" >> $GITHUB_OUTPUT + # # Save changelog content for use in release body + # echo "changelog<> $GITHUB_OUTPUT + # echo "$CHANGELOG_CONTENT" >> $GITHUB_OUTPUT + # echo "EOF" >> $GITHUB_OUTPUT - echo "✅ Changelog processed successfully" - echo "📄 Preview:" - echo "----------" - head -15 current_changelog.md - if [ $(wc -l < current_changelog.md) -gt 15 ]; then - echo "... ($(wc -l < current_changelog.md) total lines)" - fi + # echo "✅ Changelog processed successfully" + # echo "📄 Preview:" + # echo "----------" + # head -15 current_changelog.md + # if [ $(wc -l < current_changelog.md) -gt 15 ]; then + # echo "... ($(wc -l < current_changelog.md) total lines)" + # fi - - name: Update CHANGELOG.md in repository - if: steps.check-release.outputs.should_release == 'true' - run: | - echo "📝 Updating CHANGELOG.md in repository..." + # - name: Update CHANGELOG.md in repository + # if: steps.check-release.outputs.should_release == 'true' + # run: | + # echo "📝 Updating CHANGELOG.md in repository..." - # Create the new changelog entry - echo "# Changelog" > CHANGELOG_NEW.md - echo "" >> CHANGELOG_NEW.md - echo "## [v${{ steps.find-tags.outputs.version }}] - $(date +%Y-%m-%d)" >> CHANGELOG_NEW.md - echo "" >> CHANGELOG_NEW.md - cat current_changelog.md >> CHANGELOG_NEW.md - echo "" >> CHANGELOG_NEW.md + # # Create the new changelog entry + # echo "# Changelog" > CHANGELOG_NEW.md + # echo "" >> CHANGELOG_NEW.md + # echo "## [v${{ steps.find-tags.outputs.version }}] - $(date +%Y-%m-%d)" >> CHANGELOG_NEW.md + # echo "" >> CHANGELOG_NEW.md + # cat current_changelog.md >> CHANGELOG_NEW.md + # echo "" >> CHANGELOG_NEW.md - # Append existing changelog if it exists - if [ -f "CHANGELOG.md" ] && [ -s "CHANGELOG.md" ]; then - # Skip the header of existing changelog - tail -n +2 CHANGELOG.md >> CHANGELOG_NEW.md - fi + # # Append existing changelog if it exists + # if [ -f "CHANGELOG.md" ] && [ -s "CHANGELOG.md" ]; then + # # Skip the header of existing changelog + # tail -n +2 CHANGELOG.md >> CHANGELOG_NEW.md + # fi - mv CHANGELOG_NEW.md CHANGELOG.md + # mv CHANGELOG_NEW.md CHANGELOG.md - echo "✅ CHANGELOG.md updated" + # echo "✅ CHANGELOG.md updated" - - name: Commit updated CHANGELOG.md - if: steps.check-release.outputs.should_release == 'true' - run: | - echo "💾 Committing updated CHANGELOG.md..." + # - name: Commit updated CHANGELOG.md + # if: steps.check-release.outputs.should_release == 'true' + # run: | + # echo "💾 Committing updated CHANGELOG.md..." - # Configure git - git config user.name "github-actions[bot]" - git config user.email "41898282+github-actions[bot]@users.noreply.github.com" + # # Configure git + # git config user.name "github-actions[bot]" + # git config user.email "41898282+github-actions[bot]@users.noreply.github.com" - # Add and commit the changelog - git add CHANGELOG.md - if git diff --staged --quiet; then - echo "No changes to commit" - else - git commit -m "docs: update CHANGELOG.md for v${{ steps.find-tags.outputs.version }}" - git push https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}.git main - echo "✅ CHANGELOG.md committed and pushed" - fi + # # Add and commit the changelog + # git add CHANGELOG.md + # if git diff --staged --quiet; then + # echo "No changes to commit" + # else + # git commit -m "docs: update CHANGELOG.md for v${{ steps.find-tags.outputs.version }}" + # git push https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}.git main + # echo "✅ CHANGELOG.md committed and pushed" + # fi - name: Create main GitHub Release if: steps.check-release.outputs.should_release == 'true' diff --git a/CHANGELOG.md b/CHANGELOG.md index 84ca34d..b00a90c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,39 +1,10 @@ # Changelog +All notable changes to this project's latest version. -All notable changes to this project will be documented in this file. +## [0.1.16] - 2025-07-29 -The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), -and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +### Miscellaneous Tasks -## [Unreleased] +- Bump version to v0.1.16 -### Added -- Initial project setup -- Basic CLI functionality -- SDK implementation -- Configuration management system -- Template management system -- Documentation and guides - -### Changed -- Improved error handling -- Enhanced configuration management -- Updated documentation - -### Fixed -- Fixed path handling in configuration -- Fixed template download issues -- Fixed authentication flow - -## [0.1.0] - 2024-03-20 - -### Added -- Initial release -- Basic CLI commands -- SDK implementation -- Configuration system -- Template management -- Documentation - -[Unreleased]: https://github.com/runagent-dev/runagent/compare/v0.1.0...HEAD -[0.1.0]: https://github.com/runagent-dev/runagent/releases/tag/v0.1.0 \ No newline at end of file + diff --git a/cliff.toml b/cliff.toml index 8022248..0a6532b 100644 --- a/cliff.toml +++ b/cliff.toml @@ -3,7 +3,7 @@ # changelog header header = """ # Changelog -All notable changes to this project will be documented in this file. +All notable changes to this project's latest version. """ # template for the changelog body diff --git a/pyproject.toml b/pyproject.toml index ca4df23..88f0563 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -5,7 +5,7 @@ build-backend = "hatchling.build" [project] name = "runagent" -version = "0.1.9" +version = "0.1.16" description = "A command-line tool and SDK for deploying, managing, and interacting with AI agents" readme = "README.md" requires-python = ">=3.9" @@ -103,7 +103,7 @@ line_length = 88 skip = ["docs"] [tool.mypy] -python_version = "0.1.9" +python_version = "0.1.16" warn_return_any = true warn_unused_configs = true disallow_untyped_defs = true @@ -159,7 +159,7 @@ fail_under = 80 [tool.ruff] line-length = 88 -target-version = "0.1.9" +target-version = "0.1.16" select = [ "E", # pycodestyle errors "W", # pycodestyle warnings diff --git a/release.sh b/release.sh index aa750bb..cbdbd35 100644 --- a/release.sh +++ b/release.sh @@ -14,15 +14,73 @@ usage() { echo "Version: semantic version (e.g., 1.2.3)" echo "" echo "This will:" - echo " 1. Update version in all SDK package files" - echo " 2. Commit the changes" - echo " 3. Create a git tag v" - echo " 4. Push everything to current branch" + echo " 1. Check for git-cliff installation" + echo " 2. Update version in all SDK package files" + echo " 3. Generate changelog with git-cliff" + echo " 4. Commit the changes" + echo " 5. Create a git tag v" + echo " 6. Push everything to current branch" echo "" echo "Example:" echo "bash ./release.sh 1.2.3" } +check_git_cliff() { + echo "🔍 Checking for git-cliff..." + + if ! command -v git-cliff &> /dev/null; then + echo "" + echo "❌ Error: git-cliff is not installed!" + echo "" + echo "📥 Installation options:" + echo "" + echo "1. Using Cargo (Rust):" + echo " cargo install git-cliff" + echo "" + echo "2. Using Homebrew (macOS):" + echo " brew install git-cliff" + echo "" + echo "3. Using package managers:" + echo " # Arch Linux" + echo " pacman -S git-cliff" + echo "" + echo " # Fedora" + echo " dnf install git-cliff" + echo "" + echo "4. Download binary from GitHub:" + echo " https://github.com/orhun/git-cliff/releases" + echo "" + echo "5. Quick install script:" + echo " curl -L https://github.com/orhun/git-cliff/releases/latest/download/git-cliff-\$(uname -m)-unknown-linux-gnu.tar.gz | tar -xz" + echo " sudo mv git-cliff-*/git-cliff /usr/local/bin/" + echo "" + echo "Please install git-cliff and run this script again." + exit 1 + fi + + local cliff_version + cliff_version=$(git-cliff --version 2>/dev/null | head -1) + echo "✅ Found: $cliff_version" + + # Check if cliff.toml exists + if [[ ! -f "cliff.toml" ]]; then + echo "" + echo "⚠️ Warning: cliff.toml configuration file not found!" + echo " git-cliff will use default configuration." + echo " Consider creating cliff.toml for better changelog formatting." + echo "" + echo "📝 To create a basic cliff.toml:" + echo " git-cliff --init" + echo "" + read -p "Continue without cliff.toml? [y/N]: " -r + echo "" + if [[ ! $REPLY =~ ^[Yy]$ ]]; then + echo "Release cancelled. Please create cliff.toml first." + exit 0 + fi + fi +} + validate_version() { local version=$1 if [[ ! $version =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then @@ -163,6 +221,58 @@ EOF fi } +generate_changelog() { + # local version=$1 + # local tag_name="v$version" + + # echo "📝 Generating changelog with git-cliff..." + + # # Find the previous tag to determine range + # local last_tag + # last_tag=$(git describe --tags --abbrev=0 2>/dev/null || echo "") + + # if [[ -n "$last_tag" ]]; then + # echo "📍 Generating changelog for range: $last_tag → $tag_name" + + # # Generate changelog for the current version using --latest if we're at the latest + # # Or specify the tag explicitly for historical generation + # if [[ -f "cliff.toml" ]]; then + # First try to generate for the specific tag + # git-cliff --tag "$tag_name" --latest --strip header --strip footer > "CHANGELOG_NEW.md" 2>/dev/null || { + # echo "⚠️ git-cliff --latest failed, trying full tag generation" + # git-cliff --tag "$tag_name" --strip header --strip footer > "CHANGELOG_NEW.md" 2>/dev/null || { + # echo "⚠️ git-cliff failed, creating basic changelog" + # create_basic_changelog "$version" "$last_tag" + # return + # } + # } + # else + # git-cliff --tag "$tag_name" --latest --strip header --strip footer > "CHANGELOG_NEW.md" 2>/dev/null || { + # echo "⚠️ git-cliff failed, creating basic changelog" + # create_basic_changelog "$version" "$last_tag" + # return + # } + # fi + # else + # echo "📍 No previous tags found - generating changelog for initial release" + # create_initial_changelog "$version" + # return + # fi + + # Check if we got meaningful output + # if [[ ! -s "CHANGELOG_NEW.md" ]] || [[ $(wc -l < "CHANGELOG_NEW.md") -lt 2 ]]; then + # echo "⚠️ git-cliff produced minimal output, creating basic changelog" + # create_basic_changelog "$version" "$last_tag" + # return + # fi + git-cliff --output CHANGELOG.md --latest + # Update main CHANGELOG.md + # update_main_changelog "$version" + + echo "✅ Changelog generated successfully" +} + + show_update_summary() { echo "" echo "📋 Update Summary:" @@ -207,6 +317,7 @@ check_prerequisites() { echo "❌ Error: Not in a git repository or git is not working" exit 1 fi + } handle_existing_tag() { @@ -229,11 +340,13 @@ handle_existing_tag() { fi echo "Moving tag $tag_name to current commit..." + git tag -f -a "$tag_name" -m "Release $tag_name (moved) RunAgent Universal Release $tag_name All SDKs updated to version $version" + return 0 fi @@ -254,8 +367,12 @@ fi echo "🚀 RunAgent Version Bump to v$VERSION" +# FIRST: Check git-cliff before making any changes +check_git_cliff + check_prerequisites + # Update all package files update_python_version "$VERSION" update_javascript_version "$VERSION" @@ -272,9 +389,16 @@ fi if [[ "$any_success" == "false" ]]; then echo "❌ No version updates succeeded. Aborting release." + # # Restore backup + # if [[ -f "CHANGELOG.md.bak" ]]; then + # mv "CHANGELOG.md.bak" "CHANGELOG.md" + # fi exit 1 fi +# Generate changelog +# generate_changelog "$VERSION" + # Show git changes if ! git diff --name-only --quiet 2>/dev/null; then echo "Changes detected:" @@ -289,15 +413,19 @@ echo "" if [[ ! $REPLY =~ ^[Yy]$ ]]; then echo "Release cancelled." git checkout -- . 2>/dev/null || true + exit 0 fi + # Handle existing tag if handle_existing_tag "$VERSION"; then echo "✅ Tag v$VERSION updated successfully!" + generate_changelog exit 0 fi + # Stage and commit changes git add . @@ -306,15 +434,21 @@ if git diff --staged --quiet; then exit 1 fi -git commit -m "chore: bump version to v$VERSION" -q +git commit -m "chore: bump version to v$VERSION -# Create new tag -git tag -a "v$VERSION" -m "Release v$VERSION +- Updated all SDK versions to $VERSION +- Generated changelog with git-cliff" -q +# # Create new tag +git tag -a "v$VERSION" -m "Release v$VERSION RunAgent Universal Release v$VERSION" echo "✅ Tag v$VERSION created successfully!" +generate_changelog + + + CURRENT_BRANCH=$(git branch --show-current 2>/dev/null || git rev-parse --abbrev-ref HEAD 2>/dev/null) echo "" echo "📋 Next steps:" diff --git a/runagent-go/runagent/version.go b/runagent-go/runagent/version.go index 26f0308..3667219 100644 --- a/runagent-go/runagent/version.go +++ b/runagent-go/runagent/version.go @@ -1,4 +1,4 @@ package runagent // Version represents the current version of the RunAgent Go SDK -const Version = "0.1.9" +const Version = "0.1.16" diff --git a/runagent-rust/runagent/Cargo.toml b/runagent-rust/runagent/Cargo.toml index d2b1f6f..d29b83e 100644 --- a/runagent-rust/runagent/Cargo.toml +++ b/runagent-rust/runagent/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "runagent" -version = "0.1.9" +version = "0.1.16" edition = "2021" description = "RunAgent SDK for Rust - Deploy and manage AI agents easily" license = "MIT" diff --git a/runagent-ts/package-lock.json b/runagent-ts/package-lock.json index 9e9d934..ce67591 100644 --- a/runagent-ts/package-lock.json +++ b/runagent-ts/package-lock.json @@ -1,12 +1,12 @@ { "name": "runagent", - "version": "0.1.9", + "version": "0.1.16", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "runagent", - "version": "0.1.9", + "version": "0.1.16", "dependencies": { "better-sqlite3": "^12.2.0" }, diff --git a/runagent-ts/package.json b/runagent-ts/package.json index 4fb641e..1ec50e2 100644 --- a/runagent-ts/package.json +++ b/runagent-ts/package.json @@ -1,6 +1,6 @@ { "name": "runagent", - "version": "0.1.9", + "version": "0.1.16", "type": "module", "files": [ "dist" diff --git a/runagent/__version__.py b/runagent/__version__.py index c11f861..970659c 100644 --- a/runagent/__version__.py +++ b/runagent/__version__.py @@ -1 +1 @@ -__version__ = "0.1.9" +__version__ = "0.1.16"