Skip to content

Commit d8711a2

Browse files
committed
Add automated releases
1 parent eb7fa18 commit d8711a2

3 files changed

Lines changed: 62 additions & 1 deletion

File tree

.github/workflows/release.yml

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags:
6+
- "v*.*.*"
7+
8+
permissions:
9+
contents: write
10+
11+
jobs:
12+
release:
13+
runs-on: windows-2025
14+
15+
steps:
16+
- name: Check out repository
17+
uses: actions/checkout@v6
18+
19+
- name: Configure
20+
run: cmake -S . -B build -A x64
21+
22+
- name: Build
23+
run: cmake --build build --config Release
24+
25+
- name: Package
26+
shell: pwsh
27+
run: |
28+
New-Item -ItemType Directory -Force dist\DwmCornerPatcher | Out-Null
29+
30+
Copy-Item build\Release\DwmCornerPatcher.exe dist\DwmCornerPatcher
31+
Copy-Item README.md dist\DwmCornerPatcher
32+
33+
foreach ($file in @("dbghelp.dll", "symsrv.dll")) {
34+
$path = Join-Path "build\Release" $file
35+
if (Test-Path $path) {
36+
Copy-Item $path dist\DwmCornerPatcher
37+
}
38+
}
39+
40+
Compress-Archive `
41+
-Path dist\DwmCornerPatcher\* `
42+
-DestinationPath dist\DwmCornerPatcher-x64.zip
43+
44+
- name: Create GitHub release
45+
env:
46+
GH_TOKEN: ${{ github.token }}
47+
run: >
48+
gh release create "${{ github.ref_name }}"
49+
"dist\DwmCornerPatcher-x64.zip"
50+
--verify-tag
51+
--generate-notes
52+
--title "DwmCornerPatcher ${{ github.ref_name }}"

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
cmake_minimum_required(VERSION 4.3)
1+
cmake_minimum_required(VERSION 3.20)
22
project(DwmCornerPatcher C)
33

44
set(CMAKE_C_STANDARD 11)

README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,15 @@ Use `help` or `--help` to list the available commands.
4545
The program restarts Desktop Window Manager after applying or restoring the
4646
patch. The screen may briefly flicker while DWM restarts.
4747

48+
## Releases
49+
50+
Pushing a version tag builds the x64 package and publishes a GitHub release:
51+
52+
```powershell
53+
git tag v1.0.0
54+
git push origin v1.0.0
55+
```
56+
4857
## Compatibility
4958

5059
Only x64 editions of Windows 11 are currently supported. Windows 11 ARM64 is

0 commit comments

Comments
 (0)