From 397343b36f55d7331439df91dab874f868d77f25 Mon Sep 17 00:00:00 2001 From: halx99 Date: Sun, 25 Feb 2024 12:38:16 +0800 Subject: [PATCH] Release 2.1.2 [release 2.1.2] --- .github/workflows/publish.yml | 2 +- CHANGELOG.md | 2 +- thirdparty/glfw/src/win32_window.c | 2 +- tools/ci/{make-pkg.ps1 => publish.ps1} | 36 +++++++++++++++++++++++--- 4 files changed, 36 insertions(+), 6 deletions(-) rename tools/ci/{make-pkg.ps1 => publish.ps1} (92%) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 4ba12177b74a..7f0cc576ebaf 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -61,7 +61,7 @@ jobs: $AX_ROOT = $(pwd).Path ./1k/fetch.ps1 -name 'oboe' -prefix $(Join-Path $AX_ROOT 'cache') -cfg $(Join-Path $AX_ROOT 'manifest.json') ./build.ps1 -xc '-DAX_WITH_LZ4=ON,-DAX_WITH_CARES=ON,-DAX_WITH_YAML_CPP=ON,-DAX_WITH_KCP=ON' -c - ./tools/ci/make-pkg.ps1 -version "${{ steps.forward_ver.outputs.release_ver }}" + ./tools/ci/publish.ps1 -version "${{ steps.forward_ver.outputs.release_ver }}" - name: Publish to github release page if: ${{ steps.make_pkg.outputs.release_tag != '' }} diff --git a/CHANGELOG.md b/CHANGELOG.md index cb503ffcbce8..5f8eee5e35be 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,4 @@ -## axmol-2.1.2 ?? 2024 +## axmol-2.1.2 Feb.25 2024 ### BugFixes diff --git a/thirdparty/glfw/src/win32_window.c b/thirdparty/glfw/src/win32_window.c index 4c3c421573cc..26e8fb912e5e 100644 --- a/thirdparty/glfw/src/win32_window.c +++ b/thirdparty/glfw/src/win32_window.c @@ -1282,7 +1282,7 @@ static int createNativeWindow(_GLFWwindow* window, const _GLFWfbconfig* fbconfig) { int frameX, frameY, frameWidth, frameHeight; - WCHAR* wideTitle; + WCHAR* wideTitle; DWORD style = getWindowStyle(window); DWORD exStyle = getWindowExStyle(window); diff --git a/tools/ci/make-pkg.ps1 b/tools/ci/publish.ps1 similarity index 92% rename from tools/ci/make-pkg.ps1 rename to tools/ci/publish.ps1 index 2bbff1cd8d75..e878204f7e21 100644 --- a/tools/ci/make-pkg.ps1 +++ b/tools/ci/publish.ps1 @@ -24,7 +24,8 @@ if (!$version -or ($version -eq 'auto')) { $axver += "-$commitHash" $axver += '-nightly' } - } else { + } + else { $axver += $(parse_axver 'PATCH') } return $axver @@ -306,6 +307,36 @@ public class UnixFileStream : FileStream return $Script:total } +# Generate release note + +if ($prerelease -eq 'false') { + $release_note = Join-Path $AX_ROOT "release_note_${version}.txt" +} +else { + $release_note = Join-Path $AX_ROOT "release_note_draft.txt" +} + +New-Item -Path $release_note -ItemType File -Force + +$changelog_lines = Get-Content (Join-Path $AX_ROOT 'CHANGELOG.md') +$release_count = 0 +$release_note_content = '' +foreach ($line in $changelog_lines) { + if ($line.StartsWith('## axmol-')) { + ++$release_count + if ($release_count -lt 2) { + $release_note_content += "*The $version release is a minor ``LTS`` release for bugfixes and improvements*`n" + } else { + break + } + } + else { + $release_note_content += "$line`n" + } +} + +[System.IO.File]::AppendAllText($release_note, $release_note_content) + # Compress-Archive @compress_args $total = Compress-ArchiveEx @compress_args -Force @@ -316,8 +347,7 @@ Write-Host "Create package $pkg_file_path done, ${total} files found, MD5: $md5_ Pop-Location if ($env:GITHUB_ACTIONS -eq 'true') { - $release_note = Join-Path $AX_ROOT "release_note_draft.txt" - [System.IO.File]::WriteAllText($release_note, "## MD5 Hash of the release artifacts`n - ``${pkg_file_name}``: $md5_digest") + [System.IO.File]::AppendAllText($release_note, "## MD5 Hash of the release artifacts`n - ``${pkg_file_name}``: $md5_digest") echo "release_tag=v$version" >> ${env:GITHUB_OUTPUT} echo "release_pkg=$pkg_file_name" >> ${env:GITHUB_OUTPUT} echo "release_note=$release_note" >> ${env:GITHUB_OUTPUT}