chore: changelog (#5851)
* fix: modrinth hosting changelog in app changelog for github releases * chore: changelog
This commit is contained in:
66
.github/workflows/theseus-release.yml
vendored
66
.github/workflows/theseus-release.yml
vendored
@@ -60,16 +60,70 @@ jobs:
|
||||
const fs = require('fs');
|
||||
const version = process.env.VERSION.replace(/^v/, '');
|
||||
const src = fs.readFileSync('packages/blog/changelog.ts', 'utf8');
|
||||
const escaped = version.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
|
||||
const re = new RegExp("product:\\s*'app',\\s*version:\\s*'" + escaped + "',\\s*body:\\s*`([\\s\\S]*?)`,\\s*\\}");
|
||||
const m = src.match(re);
|
||||
if (!m) {
|
||||
|
||||
// Parse every entry in the VERSIONS array, preserving their order
|
||||
// (which is reverse chronological).
|
||||
const entryRe = /\{\s*date:\s*`([^`]+)`,\s*product:\s*'(\w+)',(?:\s*version:\s*[`']([^`']+)[`'],)?\s*body:\s*`([\s\S]*?)`,\s*\}/g;
|
||||
const entries = [];
|
||||
let match;
|
||||
while ((match = entryRe.exec(src)) !== null) {
|
||||
entries.push({
|
||||
date: match[1],
|
||||
product: match[2],
|
||||
version: match[3],
|
||||
body: match[4],
|
||||
});
|
||||
}
|
||||
|
||||
const currentIdx = entries.findIndex(
|
||||
(e) => e.product === 'app' && e.version === version,
|
||||
);
|
||||
if (currentIdx === -1) {
|
||||
console.error(`No app changelog entry found for version ${version}`);
|
||||
process.exit(1);
|
||||
}
|
||||
fs.writeFileSync('release-notes.md', m[1]);
|
||||
|
||||
// Find the surrounding app entries so we can scope hosting changes to
|
||||
// exactly what shipped between the previous app release and this one.
|
||||
// Entries are in reverse chronological order, so newer entries have
|
||||
// smaller indices than older entries.
|
||||
let newerAppIdx = -1;
|
||||
for (let i = currentIdx - 1; i >= 0; i--) {
|
||||
if (entries[i].product === 'app') {
|
||||
newerAppIdx = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
let previousAppIdx = entries.length;
|
||||
for (let i = currentIdx + 1; i < entries.length; i++) {
|
||||
if (entries[i].product === 'app') {
|
||||
previousAppIdx = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
const hostingEntries = [];
|
||||
for (let i = newerAppIdx + 1; i < previousAppIdx; i++) {
|
||||
if (entries[i].product === 'hosting') {
|
||||
hostingEntries.push(entries[i]);
|
||||
}
|
||||
}
|
||||
|
||||
let output = entries[currentIdx].body;
|
||||
if (hostingEntries.length > 0) {
|
||||
// Demote any top-level section headings inside hosting bodies so
|
||||
// they nest cleanly under the "Modrinth Hosting (included)" header.
|
||||
const demoteHeadings = (body) =>
|
||||
body.replace(/^(#{1,5})\s/gm, (_, hashes) => `${hashes}# `);
|
||||
const hostingBody = hostingEntries
|
||||
.map((e) => demoteHeadings(e.body))
|
||||
.join('\n\n');
|
||||
output += `\n\n---\n\n## Modrinth Hosting (included)\n\n${hostingBody}`;
|
||||
}
|
||||
|
||||
fs.writeFileSync('release-notes.md', output);
|
||||
console.log(`Extracted changelog for app ${version}:`);
|
||||
console.log(m[1]);
|
||||
console.log(output);
|
||||
EOF
|
||||
|
||||
- name: 🛠️ Generate version manifest
|
||||
|
||||
@@ -10,6 +10,49 @@ export type VersionEntry = {
|
||||
}
|
||||
|
||||
const VERSIONS: VersionEntry[] = [
|
||||
{
|
||||
date: `2026-04-18T19:00:59+00:00`,
|
||||
product: 'app',
|
||||
version: '0.13.2',
|
||||
body: `## Added
|
||||
- Instances on the Library page are now grouped into collapsible accordions if they have an associated group. Thanks to [@kirushkinx](https://github.com/kirushkinx)!
|
||||
|
||||
## Changed
|
||||
- Redesigned the "Find and Replace" tool in the instance Files tab editor to match the rest of the platform. Thanks to [@Creeperkatze](https://github.com/Creeperkatze)!
|
||||
|
||||
## Fixed
|
||||
- Worlds and servers in the instance Worlds tab now load almost instantly instead of taking one to two seconds.
|
||||
- Fixed the Modrinth+ upgrade button and ad banner not staying pinned to the bottom right.
|
||||
- Fixed servers in the "Jump back in" section of the home page loading slowly. Thanks to [@Creeperkatze](https://github.com/Creeperkatze)!
|
||||
- Fixed several issues with the splash screen.
|
||||
- Fixed the cancel button when changing the install directory.
|
||||
- Fixed symlinks breaking directory moves.`,
|
||||
},
|
||||
{
|
||||
date: `2026-04-18T19:00:59+00:00`,
|
||||
product: 'hosting',
|
||||
body: `## Added
|
||||
- Alpha and beta indicators next to Paper build numbers in the server onboarding and reset modals and on the platform settings page.
|
||||
|
||||
## Changed
|
||||
- Moved the "Kill server" action into a joined dropdown button with the "Stop" action.
|
||||
- Swapped the positions of the "Restart" and "Stop" actions in the server panel.
|
||||
- Redesigned the "Find and Replace" tool in the Files tab editor to match the rest of the platform. Thanks to [@Creeperkatze](https://github.com/Creeperkatze)!
|
||||
|
||||
## Fixed
|
||||
- Fixed slow tab switching in the server panel.
|
||||
- Fixed slow loading of the "Manage servers" page in the Modrinth App and slow interactions with it on the website.`,
|
||||
},
|
||||
{
|
||||
date: `2026-04-18T19:00:59+00:00`,
|
||||
product: 'web',
|
||||
body: `## Added
|
||||
- Tabs in the version edit modal for switching between version pages.
|
||||
|
||||
## Fixed
|
||||
- Fixed incorrect margins on project cards.
|
||||
- Fixed slow loading of the 404 page. Thanks to [@IsQuyet](https://github.com/IsQuyet)!`,
|
||||
},
|
||||
{
|
||||
date: `2026-04-15T19:39:48+00:00`,
|
||||
product: 'hosting',
|
||||
|
||||
Reference in New Issue
Block a user