Skip to content

Commit 3f3e3d2

Browse files
committed
cd: fix changelog cd
1 parent e2740fd commit 3f3e3d2

3 files changed

Lines changed: 31 additions & 52 deletions

File tree

.github/workflows/nightly.yml

Lines changed: 11 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -81,61 +81,28 @@ jobs:
8181

8282
- name: Build changelog
8383
if: steps.changes.outputs.has_changes == 'true'
84-
env:
85-
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
8684
run: |
87-
# Reuse the tag resolved in the changes step so both steps are consistent
88-
LAST_TAG="${{ steps.changes.outputs.last_tag }}"
8985
DATE_DISPLAY=$(date -u '+%B %d, %Y')
9086
SHORT_SHA="${GITHUB_SHA:0:7}"
9187
REPO="${{ github.repository }}"
9288
93-
# Fetch merged PRs via the GitHub CLI since the last release tag.
94-
# Falls back to a commit list when no PRs are found (direct pushes, etc.)
95-
if [ -n "$LAST_TAG" ]; then
96-
SINCE=$(git log -1 --format=%aI "${LAST_TAG}")
97-
PR_LIST=$(gh pr list \
98-
--state merged \
99-
--base v3.x \
100-
--search "merged:>=${SINCE}" \
101-
--json number,title,author,url \
102-
--jq '.[] | "- **\(.title)** [#\(.number)](\(.url)) — @\(.author.login)"' \
103-
2>/dev/null || true)
104-
else
105-
PR_LIST=$(gh pr list \
106-
--state merged \
107-
--base v3.x \
108-
--json number,title,author,url \
109-
--jq '.[] | "- **\(.title)** [#\(.number)](\(.url)) — @\(.author.login)"' \
110-
2>/dev/null || true)
111-
fi
112-
113-
if [ -n "$PR_LIST" ]; then
114-
{
115-
printf '#### What changed\n\n'
116-
printf '%s\n' "$PR_LIST"
117-
} > changelog.md
118-
else
119-
# Fallback: list non-bot commits since the last tag
120-
{
121-
printf '#### What changed\n\n'
122-
git log ${LAST_TAG:+"${LAST_TAG}..HEAD"} ${LAST_TAG:-"-10"} \
123-
--format="%an%x09%H%x09%s" \
124-
| while IFS=$'\t' read -r author sha subject; do
125-
[[ "$author" == "github-actions[bot]" ]] && continue
126-
short="${sha:0:7}"
127-
printf '%s\n' "- ${subject} ([${short}](https://github.com/${REPO}/commit/${sha}))"
128-
done
129-
} > changelog.md
130-
fi
89+
# Extract the [Unreleased] section from CHANGELOG.md as the primary changelog.
90+
UNRELEASED=$(awk \
91+
'/^## \[Unreleased\]/ { p=1; next }
92+
/^## \[/ && p { exit }
93+
p { print }' \
94+
CHANGELOG.md | sed '/^[[:space:]]*$/d')
13195
13296
{
133-
printf '\n#### Notes\n\n'
97+
if [ -n "$UNRELEASED" ]; then
98+
printf '%s\n\n' "$UNRELEASED"
99+
fi
100+
printf '#### Notes\n\n'
134101
printf '> 🌙 Automated nightly beta build from `v3.x` (%s).\n' "$DATE_DISPLAY"
135102
printf '>\n'
136103
printf '> Built from [`%s`](https://github.com/%s/commit/%s)\n' \
137104
"$SHORT_SHA" "$REPO" "${{ github.sha }}"
138-
} >> changelog.md
105+
} > changelog.md
139106
140107
echo "=== Changelog preview ===" && cat changelog.md
141108

.github/workflows/release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,10 +101,10 @@ jobs:
101101
'/^## \[/ && p { exit }
102102
index($0, hdr) == 1 { p=1; next }
103103
p { print }' \
104-
CHANGELOG.md | sed '/^[[:space:]]*$/d')
104+
CHANGELOG.md)
105105
106106
if [[ -z "$NOTES" ]]; then
107-
NOTES="See [CHANGELOG.md](https://github.com/${{ github.repository }}/blob/${{ steps.meta.outputs.ref }}/CHANGELOG.md) for details."
107+
NOTES="No changelog entry found for ${VERSION}."
108108
fi
109109
110110
printf '%s\n' "$NOTES" > release-notes.md

CHANGELOG.md

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,6 @@ Release tags use the `v` prefix (e.g. `v3.0.2`).
1212

1313
### Added
1414

15-
- **Movement-cancel during countdown**: if a player moves too far from their starting position while a countdown is running, the teleport is cancelled.
16-
- `countdown.cancel-on-move` (default `true`) — enable or disable the feature.
17-
- `countdown.cancel-distance` (default `2.0`) — distance in blocks that triggers cancellation.
18-
- `countdown.warn-distance` (default `1.0`) — distance in blocks that sends a one-time warning before cancellation. Set to `0` to disable the warning.
19-
- Two new message keys: `countdown-move-warn` and `countdown-move-cancel` (configurable in `messages/en.yml`).
20-
2115
### Changed
2216

2317
### Fixed
@@ -34,6 +28,24 @@ Release tags use the `v` prefix (e.g. `v3.0.2`).
3428
- `messages.suppress-player`: when `true`, silences all teleport-related messages to players globally (searching, countdown, queue position, success, failure, cost).
3529
- `messages.suppress-console`: when `true`, silences the executor notification that `/forcertp` sends to the command sender globally.
3630
- **`--skip-message` command flag**: can be appended to `/rtp`, `/rtp <center|region>`, `/forcertp <player> [world]`, and `/rtp forcertp <player> [world]` to suppress both player-facing and executor messages for that single invocation. Tab-completion suggests the flag.
31+
- **`BiomeCompat` utility** (`ezrtp-common`): reflection-based `safeName(Biome)` and `safeValueOf(String)` helpers that work correctly whether `org.bukkit.block.Biome` is an enum (Spigot/Bukkit ≤ Paper 25) or an interface (Paper 26+), preventing `IncompatibleClassChangeError` at runtime.
32+
- **Movement-cancel during countdown**: if a player moves too far from their starting position while a countdown is running, the teleport is cancelled.
33+
- `countdown.cancel-on-move` (default `true`) — enable or disable the feature.
34+
- `countdown.cancel-distance` (default `2.0`) — distance in blocks that triggers cancellation.
35+
- `countdown.warn-distance` (default `1.0`) — distance in blocks that sends a one-time warning before cancellation. Set to `0` to disable the warning.
36+
- Two new message keys: `countdown-move-warn` and `countdown-move-cancel` (configurable in `messages/en.yml`).
37+
38+
### Changed
39+
40+
- **Minecraft version support expanded to 1.13+**: `api-version` in `plugin.yml` lowered from `1.21` to `1.13`; plugin will now load on any server from MC 1.13 onwards.
41+
- **Java 17 output bytecode**: `maven.compiler.release` changed from `25` to `17` so the built JARs run on Java 17+ hosts. The build toolchain still requires JDK 25 to compile against `paper-api`.
42+
- **Modrinth `game-versions` broadened to `>=1.13`** in release and nightly workflows (was `>=26.1`).
43+
- **`RareBiomeRegistry.getDefaultRareBiomes()`**: replaced a single try/catch wrapping all `Biome.valueOf()` calls with per-biome `BiomeCompat.safeValueOf()` guards, so a biome absent on the running server version (e.g. `MODIFIED_JUNGLE` removed in 1.18, `DEEP_DARK` added in 1.19) no longer silently prevents the remaining biomes from being registered.
44+
- All `biome.name()` call sites replaced with `BiomeCompat.safeName(biome)` across `RareBiomeRegistry`, `GuiSettings`, `BiomeLocationCache`, `StatsSubcommand`, and `HeatmapSubcommand`.
45+
46+
### Fixed
47+
48+
- Stale `<fork>`, `<executable>`, and `<jvm>` references to deleted `java25.javac` / `java25.java` properties removed from root `pom.xml` compiler and Surefire plugin configuration.
3749

3850
---
3951

0 commit comments

Comments
 (0)