ci: put real changelogs in releases

This commit is contained in:
Felitendo committed 2026-09-18 09:02:47 +02:00
1 parent daedc88f2d
commit e3e36cd158
2 files changed
+37 -4

No files matched your search

+35 -3
View File
@@ -100,7 +100,10 @@ jobs:
needs: [detect, build] needs: [detect, build]
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
# The whole history: the release notes are the commits since the last one.
- uses: actions/checkout@v4 - uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Record the upstream release we build against - name: Record the upstream release we build against
env: env:
@@ -200,18 +203,47 @@ jobs:
}' "$patch" }' "$patch"
done done
)" )"
patch_count="$(printf '%s\n' "$patches" | grep -c '^- ' || true)"
# What changed here since the last release, as its commit subjects.
# The bump of upstream.txt is left out: the line above already says
# which Modrinth App this is built from.
previous="$(gh release view --json tagName --jq .tagName 2>/dev/null || true)"
changes=""
if [ -n "$previous" ]; then
changes="$(
git log --reverse --no-merges --pretty='- %s' "$previous..HEAD" |
grep -v '^- Track upstream ' || true
)"
fi
if [ -z "$changes" ]; then
changes="- Rebuilt on Modrinth App $UPSTREAM, with the patches unchanged."
fi
if [ -n "$previous" ]; then
changes="$changes
[Everything since $previous](https://github.com/$GITHUB_REPOSITORY/compare/$previous...$TAG)"
fi
notes="$(cat <<EOF notes="$(cat <<EOF
Modrinth Enhanced $TAG, built from [Modrinth App $UPSTREAM](https://github.com/modrinth/code/releases/tag/$UPSTREAM). Modrinth Enhanced $TAG, built from [Modrinth App $UPSTREAM](https://github.com/modrinth/code/releases/tag/$UPSTREAM).
Same app as upstream, with the patches in \`patches/\` applied: ## What changed
$changes
Modrinth's own changes are in the [Modrinth App $UPSTREAM release notes](https://github.com/modrinth/code/releases/tag/$UPSTREAM).
<details>
<summary>The $patch_count patches in this build</summary>
$patches $patches
</details>
It keeps using the same data directory as the official Modrinth App, It keeps using the same data directory as the official Modrinth App,
so instances, settings and accounts carry over. Do not run both at so instances, settings and accounts carry over. Do not run both at
the same time. the same time.
See the upstream release notes for everything else that changed.
EOF EOF
)" )"
# The tag goes on the commit that was built, not on whatever main is # The tag goes on the commit that was built, not on whatever main is
+2 -1
View File
@@ -286,7 +286,8 @@ scripts/prepare.sh
- **Upstream release** (`.github/workflows/upstream-release.yml`) runs daily. If Modrinth has - **Upstream release** (`.github/workflows/upstream-release.yml`) runs daily. If Modrinth has
published a newer release than `upstream.txt`, it rebases the patches onto it, rebuilds and — only if every published a newer release than `upstream.txt`, it rebases the patches onto it, rebuilds and — only if every
platform built and every check passed — commits the bump, tags it with the upstream version and platform built and every check passed — commits the bump, tags it with the upstream version and
publishes a release with the installers. publishes a release with the installers. Its notes are the commits since the last release, with
the patch list folded away underneath.
- **Revisions** come from the same run: when `patches/` or `scripts/` changed since the last - **Revisions** come from the same run: when `patches/` or `scripts/` changed since the last
release of that upstream version, it is released again as `v0.21.2-2`, `v0.21.2-3` and so on. release of that upstream version, it is released again as `v0.21.2-2`, `v0.21.2-3` and so on.
The app and installers still carry the upstream version: RPM and the Windows installers do not The app and installers still carry the upstream version: RPM and the Windows installers do not