-
Notifications
You must be signed in to change notification settings - Fork 32
169 lines (137 loc) · 6.37 KB
/
build.yml
File metadata and controls
169 lines (137 loc) · 6.37 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
name: Build Release
on:
push:
tags:
- 'v*'
workflow_dispatch:
permissions:
contents: write
jobs:
build:
runs-on: windows-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: '10.0.x'
- name: Restore dependencies
run: dotnet restore WindowsEdgeLight/WindowsEdgeLight.csproj
- name: Install GitVersion
uses: gittools/actions/gitversion/setup@v4
with:
versionSpec: '6.4.x'
- name: GitVersion
uses: gittools/actions/gitversion/execute@v4
id: gitversion
- name: Set version environment variables
shell: pwsh
run: |
# Use GitVersion outputs for all versioning
$version = '${{ steps.gitversion.outputs.semVer }}'
$fullVersion = '${{ steps.gitversion.outputs.fullSemVer }}'
# Assembly version must be 4-part (x.y.z.w)
$assemblyVersion = "${{ steps.gitversion.outputs.major }}.${{ steps.gitversion.outputs.minor }}.${{ steps.gitversion.outputs.patch }}.0"
Write-Host "Using semantic version: $version"
Write-Host "Using full version: $fullVersion"
Write-Host "Using assembly version: $assemblyVersion"
echo "VERSION=$version" >> $env:GITHUB_ENV
echo "FULLVERSION=$fullVersion" >> $env:GITHUB_ENV
echo "ASSEMBLY_VERSION=$assemblyVersion" >> $env:GITHUB_ENV
- name: Build x64
run: |
dotnet publish WindowsEdgeLight/WindowsEdgeLight.csproj `
-c Release `
-r win-x64 `
/p:DebugType=None `
/p:DebugSymbols=false `
/p:Version=$env:VERSION `
/p:AssemblyVersion=$env:ASSEMBLY_VERSION `
/p:FileVersion=$env:ASSEMBLY_VERSION `
/p:AssemblyInformationalVersion=$env:FULLVERSION `
--self-contained
- name: Build ARM64
run: |
dotnet publish WindowsEdgeLight/WindowsEdgeLight.csproj `
-c Release `
-r win-arm64 `
/p:DebugType=None `
/p:DebugSymbols=false `
/p:Version=$env:VERSION `
/p:AssemblyVersion=$env:ASSEMBLY_VERSION `
/p:FileVersion=$env:ASSEMBLY_VERSION `
/p:AssemblyInformationalVersion=$env:FULLVERSION `
--self-contained
- name: Azure Login
uses: azure/login@v2
with:
creds: '{"clientId":"${{ secrets.AZURE_CLIENT_ID }}","clientSecret":"${{ secrets.AZURE_CLIENT_SECRET }}","subscriptionId":"${{ secrets.AZURE_SUBSCRIPTION_ID }}","tenantId":"${{ secrets.AZURE_TENANT_ID }}"}'
- name: Sign executables with Trusted Signing
uses: azure/trusted-signing-action@v0
with:
azure-tenant-id: ${{ secrets.AZURE_TENANT_ID }}
azure-client-id: ${{ secrets.AZURE_CLIENT_ID }}
azure-client-secret: ${{ secrets.AZURE_CLIENT_SECRET }}
endpoint: https://wus2.codesigning.azure.net/
trusted-signing-account-name: hanselman
certificate-profile-name: WindowsEdgeLight
files-folder: ${{ github.workspace }}\WindowsEdgeLight\bin\Release\net10.0-windows
files-folder-filter: exe
files-folder-recurse: true
file-digest: SHA256
timestamp-rfc3161: http://timestamp.acs.microsoft.com
timestamp-digest: SHA256
- name: Prepare artifacts
shell: pwsh
run: |
New-Item -ItemType Directory -Path artifacts -Force
# Use VERSION environment variable (calculated via GitVersion)
$version = $env:VERSION
# Create ZIP files with exe and README (so Updatum treats as portable app)
New-Item -ItemType Directory -Path "temp-x64" -Force
Copy-Item "WindowsEdgeLight/bin/Release/net10.0-windows/win-x64/publish/WindowsEdgeLight.exe" -Destination "temp-x64/"
Copy-Item "README.md" -Destination "temp-x64/"
Compress-Archive -Path "temp-x64/*" -DestinationPath "artifacts/WindowsEdgeLight-v$version-win-x64.zip"
New-Item -ItemType Directory -Path "temp-arm64" -Force
Copy-Item "WindowsEdgeLight/bin/Release/net10.0-windows/win-arm64/publish/WindowsEdgeLight.exe" -Destination "temp-arm64/"
Copy-Item "README.md" -Destination "temp-arm64/"
Compress-Archive -Path "temp-arm64/*" -DestinationPath "artifacts/WindowsEdgeLight-v$version-win-arm64.zip"
Remove-Item "temp-x64" -Recurse -Force
Remove-Item "temp-arm64" -Recurse -Force
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: WindowsEdgeLight-Release
path: artifacts/*.zip
- name: Create Release
if: startsWith(github.ref, 'refs/tags/')
uses: softprops/action-gh-release@v1
with:
files: artifacts/*.zip
body: |
## Windows Edge Light ${{ github.ref_name }}
A lightweight WPF application that adds a customizable glowing edge light effect around your primary monitor.
### 📦 Downloads
Choose the version for your Windows architecture:
- **WindowsEdgeLight-${{ github.ref_name }}-win-x64.zip** - For Intel/AMD 64-bit Windows
- **WindowsEdgeLight-${{ github.ref_name }}-win-arm64.zip** - For ARM64 Windows (Surface Pro X, etc.)
**What's inside:** Each ZIP contains `WindowsEdgeLight.exe` and `README.md` (self-contained, no .NET required)
### ✨ What's New
- **Automatic Updates**: Built-in update checker notifies you of new versions
- **One-Click Install**: Download and install updates directly from the app
- **Release Notes**: View what's new before updating
### 🚀 Features
- **Global Hotkeys**: Control from any application
- `Ctrl+Shift+L` - Toggle light on/off
- `Ctrl+Shift+↑` - Increase brightness
- `Ctrl+Shift+↓` - Decrease brightness
- **System Tray Icon**: Right-click for menu with all options
- **Primary Monitor Display**: Automatically detects and fits your main screen
- **DPI Aware**: Works perfectly on 4K displays
- **Click-Through**: Won't interfere with your work
Created by Scott Hanselman
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}