Skip to content

Commit 1197615

Browse files
committed
fix: github action has inputs only 10 items limits
1 parent 0a9162d commit 1197615

File tree

1 file changed

+22
-27
lines changed

1 file changed

+22
-27
lines changed

.github/workflows/release-manager.yml

Lines changed: 22 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -35,15 +35,11 @@ on:
3535
required: false
3636
type: number
3737
default: 15
38-
enable_tag_comparison:
39-
description: 'Enable tag comparison for changelog generation'
40-
required: false
41-
type: boolean
42-
default: true
4338
compare_with_tag:
44-
description: 'Compare with specific tag for changelog (leave empty for auto-detect previous tag)'
39+
description: 'Compare with tag for changelog (empty=auto-detect, "none"=disable comparison, or specify tag name)'
4540
required: false
4641
type: string
42+
default: 'auto'
4743
custom_changelog:
4844
description: 'Custom changelog text (prepended to auto-generated)'
4945
required: false
@@ -126,31 +122,30 @@ jobs:
126122
echo "📝 Generating changelog..."
127123
128124
PREV_TAG=""
125+
COMPARE_MODE="${{ inputs.compare_with_tag }}"
129126
130-
# Check if tag comparison is enabled
131-
if [ "${{ inputs.enable_tag_comparison }}" = "true" ]; then
132-
# Determine which tag to compare with
133-
if [ -n "${{ inputs.compare_with_tag }}" ]; then
134-
# User specified a tag
135-
PREV_TAG="${{ inputs.compare_with_tag }}"
136-
echo "🔍 Using specified tag for comparison: $PREV_TAG"
137-
138-
# Verify the tag exists
139-
if ! git rev-parse "$PREV_TAG" >/dev/null 2>&1; then
140-
echo "❌ Error: Tag '$PREV_TAG' does not exist"
141-
exit 1
142-
fi
127+
# Determine comparison mode
128+
if [ "$COMPARE_MODE" = "none" ] || [ "$COMPARE_MODE" = "NONE" ] || [ "$COMPARE_MODE" = "disable" ]; then
129+
echo "ℹ️ Tag comparison disabled, will show recent commits only"
130+
PREV_TAG=""
131+
elif [ "$COMPARE_MODE" = "auto" ] || [ "$COMPARE_MODE" = "AUTO" ] || [ -z "$COMPARE_MODE" ]; then
132+
# Auto-detect previous tag
133+
PREV_TAG=$(git describe --tags --abbrev=0 2>/dev/null || echo "")
134+
if [ -n "$PREV_TAG" ]; then
135+
echo "🔍 Auto-detected previous tag: $PREV_TAG"
143136
else
144-
# Auto-detect previous tag
145-
PREV_TAG=$(git describe --tags --abbrev=0 2>/dev/null || echo "")
146-
if [ -n "$PREV_TAG" ]; then
147-
echo "🔍 Auto-detected previous tag: $PREV_TAG"
148-
else
149-
echo "ℹ️ No previous tag found, will show recent commits"
150-
fi
137+
echo "ℹ️ No previous tag found, will show recent commits"
151138
fi
152139
else
153-
echo "ℹ️ Tag comparison disabled, will show recent commits only"
140+
# User specified a tag
141+
PREV_TAG="$COMPARE_MODE"
142+
echo "🔍 Using specified tag for comparison: $PREV_TAG"
143+
144+
# Verify the tag exists
145+
if ! git rev-parse "$PREV_TAG" >/dev/null 2>&1; then
146+
echo "❌ Error: Tag '$PREV_TAG' does not exist"
147+
exit 1
148+
fi
154149
fi
155150
156151
# Start changelog

0 commit comments

Comments
 (0)