-
Notifications
You must be signed in to change notification settings - Fork 2
52 lines (44 loc) · 1.75 KB
/
Copy pathrelease.yml
File metadata and controls
52 lines (44 loc) · 1.75 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
# Release pipeline: push a tag like v0.2.0 and this publishes a self-contained
# win-x64 zip to a GitHub Release. That release is what the app's built-in
# update checker (UiUpdateCheckService) discovers — older installs start
# showing the "new version available" notice within 24 hours.
name: Release
on:
push:
tags: ['v*']
permissions:
contents: write
jobs:
release:
runs-on: windows-latest
steps:
- name: Checkout (with harness submodule)
uses: actions/checkout@v4
with:
submodules: recursive
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 10.0.x
- name: Read curated release notes
id: notes
shell: pwsh
run: |
$version = $env:GITHUB_REF_NAME -replace '^v', ''
$notesPath = "docs/release-notes-$version.md"
if (!(Test-Path -LiteralPath $notesPath)) { throw "Missing release notes: $notesPath" }
$title = (Get-Content -LiteralPath $notesPath -TotalCount 1) -replace '^#\s+', ''
"path=$notesPath" >> $env:GITHUB_OUTPUT
"title=$title" >> $env:GITHUB_OUTPUT
- name: Publish (self-contained win-x64)
run: dotnet publish src/MandoCode.Desktop/MandoCode.Desktop.csproj -c Release -r win-x64 --self-contained -o publish
- name: Zip
shell: pwsh
run: Compress-Archive -Path publish\* -DestinationPath "MandoCode.Desktop-${{ github.ref_name }}-win-x64.zip"
- name: Create GitHub Release
uses: softprops/action-gh-release@v2
with:
files: MandoCode.Desktop-${{ github.ref_name }}-win-x64.zip
name: ${{ steps.notes.outputs.title }}
body_path: ${{ steps.notes.outputs.path }}
make_latest: true