diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 761985f..31e6c65 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -135,20 +135,18 @@ jobs: echo "Version v${{ steps.bump_version.outputs.new_version }} already exists in CHANGELOG.md, skipping update" else # Prepare new entry - cat > /tmp/new_entry.md < /tmp/new_entry.md + echo "" >> /tmp/new_entry.md cat /tmp/changelog.md | tail -n +3 >> /tmp/new_entry.md echo "" >> /tmp/new_entry.md - # Insert after the header - sed -i '1,/^All notable/r /tmp/new_entry.md' CHANGELOG.md || { - # If sed fails (no header found), just prepend - cat /tmp/new_entry.md CHANGELOG.md > /tmp/new_changelog.md - mv /tmp/new_changelog.md CHANGELOG.md - } + # Split CHANGELOG into header and content + awk '/^All notable changes/{print; print ""; exit}' CHANGELOG.md > /tmp/header.md + awk '/^All notable changes/{found=1; next} found' CHANGELOG.md > /tmp/content.md + + # Rebuild CHANGELOG with new entry inserted + cat /tmp/header.md /tmp/new_entry.md /tmp/content.md > CHANGELOG.md + echo "Added v${{ steps.bump_version.outputs.new_version }} to CHANGELOG.md" fi diff --git a/CHANGELOG.md b/CHANGELOG.md index 06c8296..fb9ee86 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,12 @@ All notable changes to this project will be documented in this file. +## [v2.3.1] - 2026-01-30 + +### 🔧 Chore + +- chore: update dependencies and GitHub Actions to latest versions (456df59) + ## [v2.3.0] - 2025-12-23 ### ✨ Features diff --git a/package.json b/package.json index 55c1eeb..f290bf4 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "react-align", - "version": "2.3.0", + "version": "2.3.1", "author": "KaWaite", "license": "MIT", "main": "./dist/react-align.umd.js",