refactor: remove unused version branch validation logic and simplify Claude changelog installation

- Removed version folder branch validation (no longer relevant with new branch structure)
- Simplified Claude CLI integration by removing fallback installation logic
- Streamlined workflow for more concise and focused validation steps
This commit is contained in:
2025-09-13 13:41:28 +02:00
parent 519684e56c
commit 26fb4891f4

View File

@@ -62,32 +62,6 @@ jobs:
echo "📦 Package: $PACKAGE_NAME" echo "📦 Package: $PACKAGE_NAME"
echo "📌 Current Version: $CURRENT_VERSION" echo "📌 Current Version: $CURRENT_VERSION"
# Validate version folder branches exist
echo "🔍 Validating version folder branches..."
MISSING_BRANCHES=""
for branch in "major" "minor" "patch"; do
if ! git ls-remote --heads origin "$branch" | grep -q "refs/heads/$branch$"; then
MISSING_BRANCHES="$MISSING_BRANCHES $branch"
fi
done
if [ -n "$MISSING_BRANCHES" ]; then
echo "❌ ERROR: Missing required version folder branches:$MISSING_BRANCHES"
echo "Please create these branches first:"
for branch in $MISSING_BRANCHES; do
echo " git checkout -b $branch && git push origin $branch"
done
echo ""
echo "Then create feature branches under them like:"
echo " git checkout -b major/breaking-change"
echo " git checkout -b minor/new-feature"
echo " git checkout -b patch/bug-fix"
exit 1
fi
echo "✅ All version folder branches exist"
# Validate Node.js version matches package.json engines # Validate Node.js version matches package.json engines
NODE_VERSION=$(node --version) NODE_VERSION=$(node --version)
echo "🔍 Validating Node.js version: $NODE_VERSION" echo "🔍 Validating Node.js version: $NODE_VERSION"
@@ -130,13 +104,7 @@ jobs:
git config --global user.name "github-actions[bot]" git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com" git config --global user.email "github-actions[bot]@users.noreply.github.com"
- name: Install Claude Code CLI - name: Generate changelog with Claude
if: steps.version-type.outputs.type != 'none'
run: |
curl -fsSL https://claude.ai/cli/install.sh | bash
echo "$HOME/.claude/bin" >> $GITHUB_PATH
- name: Generate changelog with Claude (with fallback)
if: steps.version-type.outputs.type != 'none' if: steps.version-type.outputs.type != 'none'
id: changelog id: changelog
run: | run: |
@@ -148,7 +116,6 @@ jobs:
COMMITS=$(git log --oneline --no-merges ${LAST_TAG}..HEAD || echo "No new commits") COMMITS=$(git log --oneline --no-merges ${LAST_TAG}..HEAD || echo "No new commits")
fi fi
# Generate changelog using Claude (fail if it fails) # Generate changelog using Claude (fail if it fails)
if ! command -v claude-code >/dev/null 2>&1; then if ! command -v claude-code >/dev/null 2>&1; then
echo "❌ ERROR: Claude CLI not found. Please ensure Claude Code is properly installed." echo "❌ ERROR: Claude CLI not found. Please ensure Claude Code is properly installed."