From 657508e03cc073955226880d978d12772e5ff62f Mon Sep 17 00:00:00 2001 From: Patrick Erber Date: Sun, 20 Jul 2025 13:23:30 +0200 Subject: [PATCH 1/4] feat: changelog generator --- .github/workflows/release.yml | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 2af4f4a2..7a31175e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -49,7 +49,7 @@ jobs: - name: Get latest tag before current one id: latest run: | - TAGS=$(git tag --sort=-creatordate) + TAGS=$(git tag --sort=-v:refname) echo "Available tags: $TAGS" CURRENT="${{ github.ref_name }}" PREVIOUS="" @@ -61,13 +61,20 @@ jobs: echo "Found previous tag: $PREVIOUS" echo "tag=$PREVIOUS" >> $GITHUB_OUTPUT - - name: Generate changelog from commits + - name: Debug GitHub ref + run: echo "github.ref: ${{ github.ref }} — github.ref_name: ${{ github.ref_name }}" + + - name: Generate simple changelog from git commits id: changelog - uses: heinrichreimer/action-github-changelog-generator@v2.3 - with: - token: ${{ secrets.CHANGELOG_GITHUB_TOKEN }} - sinceTag: ${{ steps.latest.outputs.tag }} - dueTag: ${{ github.ref_name }} + run: | + git fetch --tags + echo "Generating changelog from commits between ${{ steps.latest.outputs.tag }} and ${{ github.ref_name }}" + + LOG=$(git log ${{ steps.latest.outputs.tag }}..${{ github.ref_name }} --pretty=format:"- %s (%an)") + echo "$LOG" > changelog.txt + echo "changelog<> $GITHUB_OUTPUT + echo "$LOG" >> $GITHUB_OUTPUT + echo "EOF" >> $GITHUB_OUTPUT - name: Publish GitHub Release # use pinned version because of issue described here: From dccb50f7c7136444ad4d90109ec4c974e8db07f4 Mon Sep 17 00:00:00 2001 From: Patrick Erber Date: Sun, 20 Jul 2025 13:25:41 +0200 Subject: [PATCH 2/4] docs: update version information --- readme.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/readme.md b/readme.md index fb6e013e..e7b0bc6f 100644 --- a/readme.md +++ b/readme.md @@ -41,6 +41,7 @@ LeafWiki now builds and runs natively on: - 🔍 Search functionality for page titles and content - 📱 Mobile-friendly design - 🌐 Public pages (viewable without login) +- 🖨️ Print view support --- @@ -169,7 +170,7 @@ go run main.go - [x] Fix favicon not displayed - [x] ARM64 support for Raspberry Pi and other ARM devices (thanks @nahaktarun) -### ✅ v0.4.4 – Ready for Dogfooding +### ✅ v0.4.6 – Ready for Dogfooding - [x] Add Search functionality for page titles and content - [x] Add Mobile optimizations for better usability - [x] Allow Public Pages (viewable pages without login) @@ -178,6 +179,7 @@ go run main.go - [x] Added "Create & Edit" option to dialog to allow creating structure before editing - [x] Warn user about unsaved changes when navigating away (via `beforeunload` and `react-router`) - [x] Updated the tree view design – it now has a more documentation-style look +- [x] Print view support for pages (print-friendly layout) ### Upcoming Features in Version 0.5.0 From 42294c00e143ff7b9f5f74652e5477fe19d32c85 Mon Sep 17 00:00:00 2001 From: perber Date: Sun, 20 Jul 2025 13:27:18 +0200 Subject: [PATCH 3/4] Update release workflow Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- .github/workflows/release.yml | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 7a31175e..9373f991 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -68,8 +68,21 @@ jobs: id: changelog run: | git fetch --tags - echo "Generating changelog from commits between ${{ steps.latest.outputs.tag }} and ${{ github.ref_name }}" + echo "Validating tags: ${{ steps.latest.outputs.tag }} and ${{ github.ref_name }}" + + # Validate the existence of the previous tag + if ! git rev-parse --verify ${{ steps.latest.outputs.tag }} >/dev/null 2>&1; then + echo "Error: Previous tag ${{ steps.latest.outputs.tag }} does not exist." >&2 + exit 1 + fi + # Validate the existence of the current tag + if ! git rev-parse --verify ${{ github.ref_name }} >/dev/null 2>&1; then + echo "Error: Current tag ${{ github.ref_name }} does not exist." >&2 + exit 1 + fi + + echo "Generating changelog from commits between ${{ steps.latest.outputs.tag }} and ${{ github.ref_name }}" LOG=$(git log ${{ steps.latest.outputs.tag }}..${{ github.ref_name }} --pretty=format:"- %s (%an)") echo "$LOG" > changelog.txt echo "changelog<> $GITHUB_OUTPUT From 139649826e0c4b0b6704717d1805253a46624714 Mon Sep 17 00:00:00 2001 From: perber Date: Sun, 20 Jul 2025 13:27:55 +0200 Subject: [PATCH 4/4] fix: remove unused log file Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 9373f991..5b2fc4e6 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -84,7 +84,7 @@ jobs: echo "Generating changelog from commits between ${{ steps.latest.outputs.tag }} and ${{ github.ref_name }}" LOG=$(git log ${{ steps.latest.outputs.tag }}..${{ github.ref_name }} --pretty=format:"- %s (%an)") - echo "$LOG" > changelog.txt + # Removed unused changelog.txt file creation echo "changelog<> $GITHUB_OUTPUT echo "$LOG" >> $GITHUB_OUTPUT echo "EOF" >> $GITHUB_OUTPUT