-
-
Notifications
You must be signed in to change notification settings - Fork 5
56 lines (44 loc) · 1.63 KB
/
Copy pathrelease.yml
File metadata and controls
56 lines (44 loc) · 1.63 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
name: Build and Release
on:
push:
tags:
- 'v*'
permissions:
contents: write
jobs:
build:
runs-on: windows-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.0.x'
- name: Accept WiX OSMF EULA
shell: pwsh
run: |
New-Item -Path "$env:USERPROFILE\.wix" -ItemType Directory -Force
New-Item -Path "$env:USERPROFILE\.wix\wix7-osmf-eula.txt" -ItemType File -Force
- name: Restore dependencies
run: dotnet restore READYCode.sln --runtime win-x64
- name: Build app
run: dotnet build ReadyCode/ReadyCode.csproj -c Release --no-restore
- name: Build installer
run: dotnet build ReadyCode.Installer/ReadyCode.Installer.wixproj -c Release --no-restore
- name: Read Changelog
id: changelog
shell: pwsh
run: |
$content = Get-Content -Path "./CHANGELOG.md" -Raw
# Extract text between the first ## heading and the second ## heading
$match = [regex]::Match($content, '(?s)(## \[.*?)(?=\n## \[|\z)')
$section = $match.Groups[1].Value.Trim()
"CHANGELOG<<EOF" | Out-File -FilePath $env:GITHUB_OUTPUT -Append
$section | Out-File -FilePath $env:GITHUB_OUTPUT -Append
"EOF" | Out-File -FilePath $env:GITHUB_OUTPUT -Append
- name: Create GitHub Release
uses: softprops/action-gh-release@v2
with:
files: ReadyCode.Installer/bin/x64/Release/en-US/*.msi
body: ${{ steps.changelog.outputs.CHANGELOG }}