Skip to content

Commit

Permalink
Release 2.1.2 [release 2.1.2]
Browse files Browse the repository at this point in the history
  • Loading branch information
halx99 committed Feb 25, 2024
1 parent 8789204 commit 397343b
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 != '' }}
Expand Down
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## axmol-2.1.2 ?? 2024
## axmol-2.1.2 Feb.25 2024

### BugFixes

Expand Down
2 changes: 1 addition & 1 deletion thirdparty/glfw/src/win32_window.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
36 changes: 33 additions & 3 deletions tools/ci/make-pkg.ps1 → tools/ci/publish.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ if (!$version -or ($version -eq 'auto')) {
$axver += "-$commitHash"
$axver += '-nightly'
}
} else {
}
else {
$axver += $(parse_axver 'PATCH')
}
return $axver
Expand Down Expand Up @@ -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

Expand All @@ -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}
Expand Down

0 comments on commit 397343b

Please sign in to comment.