mirror of
https://github.com/xtr-dev/payload-mailing.git
synced 2025-12-10 08:13:23 +00:00
Remove Claude dependency from version workflow
### 🔧 Improvements - Replaced Claude CLI changelog generation with simple commit-based approach - Removed external dependency and potential authentication issues - Simplified changelog generation to list commit messages directly ### 🐛 Bug Fixes - Eliminated Claude CLI not found errors - Removed timeout and authentication complexities - Ensured workflow runs reliably in all environments
This commit is contained in:
51
.github/workflows/version-and-publish.yml
vendored
51
.github/workflows/version-and-publish.yml
vendored
@@ -104,7 +104,7 @@ jobs:
|
||||
git config --global user.name "github-actions[bot]"
|
||||
git config --global user.email "github-actions[bot]@users.noreply.github.com"
|
||||
|
||||
- name: Generate changelog with Claude
|
||||
- name: Generate changelog from commits
|
||||
if: steps.version-type.outputs.type != 'none'
|
||||
id: changelog
|
||||
run: |
|
||||
@@ -116,49 +116,18 @@ jobs:
|
||||
COMMITS=$(git log --oneline --no-merges ${LAST_TAG}..HEAD || echo "No new commits")
|
||||
fi
|
||||
|
||||
# Generate changelog using Claude (fail if it fails)
|
||||
if ! command -v claude-code >/dev/null 2>&1; then
|
||||
echo "❌ ERROR: Claude CLI not found. Please ensure Claude Code is properly installed."
|
||||
exit 1
|
||||
fi
|
||||
echo "📝 Generating changelog from commits"
|
||||
echo "Commits to process:"
|
||||
echo "$COMMITS"
|
||||
|
||||
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:
|
||||
# Simple changelog from commit messages
|
||||
CHANGELOG="## Changes
|
||||
|
||||
## Changes
|
||||
### 🔧 Improvements
|
||||
$(echo "$COMMITS" | sed 's/^[a-f0-9]* /- /' | head -10)"
|
||||
|
||||
### 🚀 Features
|
||||
- Brief description of new features
|
||||
|
||||
### 🐛 Bug Fixes
|
||||
- Brief description of bug fixes
|
||||
|
||||
### 🔧 Improvements
|
||||
- Brief description of improvements/refactoring
|
||||
|
||||
### 📚 Documentation
|
||||
- Brief description of documentation changes
|
||||
|
||||
### ⚡ Performance
|
||||
- Brief description of performance improvements
|
||||
|
||||
Only include sections that have actual changes. Keep each bullet point concise and user-focused.
|
||||
|
||||
Git commits to analyze:
|
||||
$COMMITS
|
||||
CLAUDE_EOF
|
||||
)
|
||||
|
||||
# Check if changelog generation succeeded
|
||||
if [ $? -ne 0 ] || [ -z "$CHANGELOG" ]; then
|
||||
echo "❌ ERROR: Failed to generate changelog with Claude. Workflow cannot continue."
|
||||
echo "Debug info - Commits to analyze:"
|
||||
echo "$COMMITS"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "✅ Successfully generated changelog with Claude"
|
||||
echo "Generated changelog:"
|
||||
echo "$CHANGELOG"
|
||||
|
||||
# Save changelog to output
|
||||
echo "changelog<<EOF" >> $GITHUB_OUTPUT
|
||||
|
||||
Reference in New Issue
Block a user