-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (42 loc) · 1.31 KB
/
Copy pathrelease.yml
File metadata and controls
51 lines (42 loc) · 1.31 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
name: Release
on:
push:
tags:
- 'v*'
permissions:
contents: write
jobs:
build-and-release:
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: false
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.0.x'
- name: Publish single-file exe
shell: pwsh
run: |
$ErrorActionPreference = 'Stop'
Set-Location "$env:GITHUB_WORKSPACE"
$out = Join-Path $env:RUNNER_TEMP 'publish'
New-Item -ItemType Directory -Path $out -Force | Out-Null
dotnet publish .\DesktopShell\DesktopShell.csproj `
-c Release `
-r win-x64 `
--self-contained true `
/p:PublishSingleFile=true `
/p:IncludeNativeLibrariesForSelfExtract=true `
/p:DebugType=None `
-o $out
$exe = Join-Path $out 'DesktopShell.exe'
if (-not (Test-Path $exe)) { throw "Expected output not found: $exe" }
- name: Create GitHub Release
uses: softprops/action-gh-release@v2
with:
files: |
${{ runner.temp }}/publish/DesktopShell.exe
generate_release_notes: true