Skip to content
Merged
Show file tree
Hide file tree
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
5 changes: 3 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,10 @@ jobs:
exit 1
fi

# Changelog first: Settings > Updates shows this body to admins.
{
cat "$CHANGELOG_SECTION"
echo
echo "## Docker images"
echo
echo "- \`ghcr.io/$OWNER/stowage-app:$VERSION\`"
Expand All @@ -267,8 +270,6 @@ jobs:
echo "## Deployment bundle"
echo
echo "- \`docker-compose.release.yml\`"
echo
cat "$CHANGELOG_SECTION"
} > release-notes.md

- name: Create GitHub Release
Expand Down
10 changes: 9 additions & 1 deletion src/__tests__/components/settings/updates-section.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ const release = {
name: "Stowage 0.3.0",
publishedAt: Date.parse("2026-11-02T09:00:00Z"),
url: "https://github.com/kroqdotdev/stowage/releases/tag/v0.3.0",
notes: "## Added\n\n- In-app updates\n- A `thing`",
notes:
"## Added\n\n- In-app updates\n- A `thing` that wraps onto\n the next line\n- Last",
prerelease: false,
};

Expand Down Expand Up @@ -98,6 +99,13 @@ describe("UpdatesSection", () => {
).toHaveAttribute("href", release.url);
expect(within(list).getByText("In-app updates")).toBeInTheDocument();
expect(within(list).getByText("thing")).toBeInTheDocument();
// The wrapped bullet stays one item; its continuation is not a paragraph.
const items = within(list).getAllByRole("listitem");
const wrapped = items.find((item) =>
item.textContent?.includes("that wraps onto the next line"),
);
expect(wrapped?.tagName).toBe("LI");
expect(within(list).queryByText(/^the next line$/)).not.toBeInTheDocument();

expect(screen.getByText("Update by hand")).toBeInTheDocument();
expect(
Expand Down
6 changes: 5 additions & 1 deletion src/components/settings/release-notes.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,11 @@ export function ReleaseNotes({
const line = raw.trimEnd();
const heading = /^(#{1,6})\s+(.*)$/.exec(line);
const bullet = /^\s*[-*]\s+(.*)$/.exec(line);
if (heading) {
// A wrapped bullet continues on indented lines in the changelog.
const continuation = /^\s+\S/.test(line) && bullets.length && !bullet;
if (continuation) {
bullets[bullets.length - 1] += ` ${line.trim()}`;
} else if (heading) {
flushBullets();
flushParagraph();
const title = heading[2].replace(/^\[([^\]]+)\].*$/, "$1");
Expand Down
Loading