Skip to content

Commit fabbc91

Browse files
authored
Append short commit sha to version number
1 parent ec19208 commit fabbc91

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

.github/workflows/main.yml

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,13 @@ jobs:
2626
with:
2727
submodules: "recursive"
2828

29+
- name: Append short commit sha to CFG_VERSION_NUM in config.h
30+
shell: powershell
31+
run: |
32+
$file = 'config.h'
33+
$short=$(git rev-parse --short HEAD)
34+
(Get-Content $file -Raw) -replace '(#define\s+CFG_VERSION_NUM\s+"[^"]*)(")', "`$1-$short`$2" | Set-Content $file
35+
2936
- name: run-vcpkg
3037
uses: lukka/run-vcpkg@v11
3138
with:
@@ -45,7 +52,15 @@ jobs:
4552

4653
- name: Build DLL
4754
run: "cmake --build build --config Release -t INSTALL"
48-
55+
56+
- name: Show DLL resources
57+
run: |
58+
$dll = "install-prefix\SimpleGraphic.dll"
59+
Write-Host "DLL path: $dll"
60+
if (Test-Path $dll) {
61+
Write-Host "VersionInfo:"; (Get-Item $dll).VersionInfo | Format-List
62+
} else { Write-Host "DLL not found" }
63+
4964
- name: Archive DLL
5065
uses: actions/upload-artifact@v4
5166
with:

0 commit comments

Comments
 (0)