From ddc9df1dba6c82c66a3fd50d706cf351416bd645 Mon Sep 17 00:00:00 2001 From: Bas van den Aakster Date: Sat, 13 Sep 2025 14:12:52 +0200 Subject: [PATCH] Update Claude CLI command to use correct syntax with print mode MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ### 🐛 Bug Fixes - Changed from `claude-code` to `claude -p` for non-interactive execution - Fixed YAML syntax issues with multiline command arguments - Used separate PROMPT variable to avoid YAML parsing conflicts ### 🔧 Improvements - Uses correct Claude CLI syntax with -p/--print flag for automation - Properly structured command for GitHub Actions environment - Maintains changelog generation functionality with correct CLI invocation 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- .github/workflows/version-and-publish.yml | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/.github/workflows/version-and-publish.yml b/.github/workflows/version-and-publish.yml index d16fc7f..9ab5878 100644 --- a/.github/workflows/version-and-publish.yml +++ b/.github/workflows/version-and-publish.yml @@ -114,14 +114,13 @@ jobs: fi # Generate changelog using Claude (fail if it fails) - if ! command -v claude-code >/dev/null 2>&1; then + if ! command -v claude >/dev/null 2>&1; then echo "❌ ERROR: Claude CLI installation failed." exit 1 fi echo "🤖 Generating changelog with Claude..." - CHANGELOG=$(timeout 240s claude-code << 'CLAUDE_EOF' - Please analyze the following git commits and generate a concise changelog in this exact format: + PROMPT="Please analyze the following git commits and generate a concise changelog in this exact format: ## Changes @@ -143,9 +142,9 @@ jobs: Only include sections that have actual changes. Keep each bullet point concise and user-focused. Git commits to analyze: - $COMMITS - CLAUDE_EOF - ) + $COMMITS" + + CHANGELOG=$(timeout 240s claude -p "$PROMPT") # Check if changelog generation succeeded if [ $? -ne 0 ] || [ -z "$CHANGELOG" ]; then