From 515dec6a7b207b754027d7ca2f94a473d938ec31 Mon Sep 17 00:00:00 2001 From: mirivlad Date: Wed, 15 Jul 2026 07:42:02 +0800 Subject: [PATCH] docs: require human release notes --- release-notes/v0.1.0-alpha.4.md | 6 ++++++ scripts/publish-github-release.sh | 13 ++++++++++++- scripts/test-publish-github-release.sh | 8 +++++++- 3 files changed, 25 insertions(+), 2 deletions(-) create mode 100644 release-notes/v0.1.0-alpha.4.md diff --git a/release-notes/v0.1.0-alpha.4.md b/release-notes/v0.1.0-alpha.4.md new file mode 100644 index 0000000..b7bdf8c --- /dev/null +++ b/release-notes/v0.1.0-alpha.4.md @@ -0,0 +1,6 @@ +## Highlights + +- Folder rows in the Files plugin now use localized labels instead of the internal `folder` type. +- File icons have localized, accessible names in both supported languages. + +Install the archive matching your platform into Verstak's plugins directory, replacing the previous official plugins bundle. diff --git a/scripts/publish-github-release.sh b/scripts/publish-github-release.sh index 7f96923..1c8d17d 100755 --- a/scripts/publish-github-release.sh +++ b/scripts/publish-github-release.sh @@ -6,6 +6,7 @@ VERSION="${1:-}" REPOSITORY="mirivlad/verstak-official-plugins" RELEASE_SCRIPT="${VERSTAK_RELEASE_SCRIPT:-$ROOT/scripts/release.sh}" RELEASE_DIR="${VERSTAK_RELEASE_DIR:-$ROOT/release}" +RELEASE_NOTES_DIR="${VERSTAK_RELEASE_NOTES_DIR:-$ROOT/release-notes}" GIT_BIN="${GIT_BIN:-git}" GH_BIN="${GH_BIN:-gh}" @@ -64,7 +65,17 @@ fi if "$GH_BIN" release view "$VERSION" --repo "$REPOSITORY" >/dev/null 2>&1; then "$GH_BIN" release upload "$VERSION" "${ASSETS[@]}" --repo "$REPOSITORY" --clobber else - RELEASE_OPTIONS=(--generate-notes --verify-tag) + NOTES_FILE="$RELEASE_NOTES_DIR/$VERSION.md" + if [[ ! -s "$NOTES_FILE" ]]; then + echo "human-readable release notes are required: $NOTES_FILE" >&2 + exit 1 + fi + + RELEASE_OPTIONS=(--notes-file "$NOTES_FILE" --generate-notes --verify-tag) + PREVIOUS_TAG="$("$GIT_BIN" describe --tags --abbrev=0 "${HEAD}^" 2>/dev/null || true)" + if [[ -n "$PREVIOUS_TAG" ]]; then + RELEASE_OPTIONS+=(--notes-start-tag "$PREVIOUS_TAG") + fi if [[ "$VERSION" == *-* ]]; then RELEASE_OPTIONS+=(--prerelease) else diff --git a/scripts/test-publish-github-release.sh b/scripts/test-publish-github-release.sh index ab2acd5..093691c 100755 --- a/scripts/test-publish-github-release.sh +++ b/scripts/test-publish-github-release.sh @@ -17,9 +17,10 @@ if [[ ! -x "$PUBLISHER" ]]; then exit 1 fi -mkdir -p "$WORK/bin" "$WORK/release" "$WORK/state" +mkdir -p "$WORK/bin" "$WORK/release" "$WORK/release-notes" "$WORK/state" LOG="$WORK/log" export LOG +printf '## Highlights\n\nHuman-readable release notes.\n' > "$WORK/release-notes/$VERSION.md" cat > "$WORK/release.sh" <<'SCRIPT' #!/usr/bin/env bash @@ -49,6 +50,7 @@ case "${1:-}" in fi echo test-commit ;; + describe) echo v0.0.0-previous ;; tag) touch "$TEST_STATE/tag"; printf 'tag:%s\n' "${3:-}" >> "$LOG" ;; push) printf 'push:%s:%s\n' "${2:-}" "${3:-}" >> "$LOG" ;; *) echo "unexpected git invocation: $*" >&2; exit 1 ;; @@ -74,6 +76,7 @@ chmod +x "$WORK/bin/gh" run_publisher() { VERSTAK_RELEASE_SCRIPT="$WORK/release.sh" \ VERSTAK_RELEASE_DIR="$WORK/release" \ + VERSTAK_RELEASE_NOTES_DIR="$WORK/release-notes" \ GIT_BIN="$WORK/bin/git" \ GH_BIN="$WORK/bin/gh" \ EXPECTED_ROOT="$ROOT" \ @@ -90,6 +93,9 @@ for asset in "${ASSET_NAMES[@]}"; do grep -F "$asset" "$LOG" >/dev/null done grep -F "SHA256SUMS" "$LOG" >/dev/null +grep -F -- "--notes-file $WORK/release-notes/$VERSION.md" "$LOG" >/dev/null +grep -F -- "--generate-notes" "$LOG" >/dev/null +grep -F -- "--notes-start-tag v0.0.0-previous" "$LOG" >/dev/null grep -F -- "--prerelease" "$LOG" >/dev/null run_publisher