Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: fix changelog extraction #1810

Merged
merged 1 commit into from
Mar 20, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .github/workflows/marketplace-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,15 +70,15 @@ jobs:
current_package_version=$(node -p "require('./package.json').version")

# Extract changelog for current version
changelog_content=$(awk -v ver="## [${current_package_version}]" '
$0 ~ ver {flag=1; next}
/^## \[/ {if (flag) exit}
flag {print}
' CHANGELOG.md)
echo "Extracting changelog for version ${current_package_version}"
changelog_content=$(sed -n "/## \\[${current_package_version}\\]/,/## \\[/p" CHANGELOG.md | sed '$d')

# If changelog extraction failed, use a default message
if [ -z "$changelog_content" ]; then
echo "Warning: No changelog section found for version ${current_package_version}"
changelog_content="Release v${current_package_version}"
else
echo "Found changelog section for version ${current_package_version}"
fi

# Create release with changelog content
Expand Down