diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 2af4f4a2..5b2fc4e6 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,33 @@ 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 "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)") + # Removed unused changelog.txt file creation + echo "changelog<> $GITHUB_OUTPUT + echo "$LOG" >> $GITHUB_OUTPUT + echo "EOF" >> $GITHUB_OUTPUT - name: Publish GitHub Release # use pinned version because of issue described here: 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