You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ci: give pre-releases a stable-style changelog body
Replace the generic pre-release body with the pending version's section
from release-please's CHANGELOG.md (read off its release-PR branch) — the
same grouped Features / Bug Fixes notes the stable release will ship, so
each pre-release previews exactly what's coming in v<base>. Falls back to
a short note when no release PR is open. Body is assembled in a file via
printf to keep markdown intact.
Signed-off-by: Mohammod Al Amin Ashik <maa.ashik00@gmail.com>
# Build release notes that mirror the stable changelog: pull the
156
+
# pending version's section straight from release-please's CHANGELOG
157
+
# on its release-PR branch (grouped Features / Bug Fixes / etc.), so
158
+
# the pre-release previews exactly what stable v$BASE will ship.
159
+
# Assembled into a file with printf to keep markdown intact (no YAML
160
+
# block-scalar indentation leaking into the body).
161
+
NOTE="Automated pre-release of v${BASE}, built from main (${{ github.sha }}). Early build — may be unstable; switch to the Stable channel in Settings → Software Updates for published releases."
162
+
printf '%s\n' "$NOTE" > body.md
163
+
if CL=$(gh api "repos/${{ github.repository }}/contents/CHANGELOG.md?ref=${BOT_BRANCH}" --jq '.content' 2>/dev/null); then
164
+
# Extract the top (pending) version section: from the first "## "
# The section carries release-please's own "## [version] (date)"
169
+
# header + grouped Features/Bug Fixes — same as the stable notes.
170
+
printf '\n%s\n' "$SECTION" >> body.md
171
+
fi
172
+
fi
173
+
151
174
RELEASE_ID=$(gh api --method POST "repos/${{ github.repository }}/releases" \
152
175
-f tag_name="$TAG" \
153
176
-f target_commitish="${{ github.sha }}" \
154
177
-f name="McpMux $TAG" \
155
-
-f body="Automated pre-release built from main (${{ github.sha }}). Early build — may be unstable. Use the Stable channel in Settings → Software Updates for published releases." \
0 commit comments