Skip to content

Commit b770609

Browse files
committed
Aggregate all package changelogs for GitHub release notes
1 parent 9bba907 commit b770609

File tree

1 file changed

+28
-1
lines changed

1 file changed

+28
-1
lines changed

.github/workflows/publish.yml

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,34 @@ jobs:
5151
pnpm --filter @salesforce/b2c-cli publish --access public --no-git-checks
5252
pnpm --filter @salesforce/b2c-dx-mcp publish --access public --no-git-checks
5353
54+
- name: Extract changelog for release
55+
run: |
56+
VERSION="${GITHUB_REF_NAME#v}"
57+
58+
# Function to extract version section from a changelog
59+
extract_version() {
60+
awk -v ver="$1" '
61+
/^## / { if (found) exit; if ($2 == ver) found=1; next }
62+
found { print }
63+
' "$2"
64+
}
65+
66+
# Build combined release notes
67+
{
68+
echo "## @salesforce/b2c-cli"
69+
echo ""
70+
extract_version "$VERSION" packages/b2c-cli/CHANGELOG.md
71+
echo ""
72+
echo "## @salesforce/b2c-dx-mcp"
73+
echo ""
74+
extract_version "$VERSION" packages/b2c-dx-mcp/CHANGELOG.md
75+
echo ""
76+
echo "## @salesforce/b2c-tooling-sdk"
77+
echo ""
78+
extract_version "$VERSION" packages/b2c-tooling-sdk/CHANGELOG.md
79+
} > /tmp/release-notes.md
80+
5481
- name: Create GitHub Release
55-
run: gh release create "$GITHUB_REF_NAME" --generate-notes
82+
run: gh release create "$GITHUB_REF_NAME" --notes-file /tmp/release-notes.md
5683
env:
5784
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)