-
Notifications
You must be signed in to change notification settings - Fork 12
58 lines (47 loc) · 1.43 KB
/
ci.yml
File metadata and controls
58 lines (47 loc) · 1.43 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
name: Build and release OptimizerNXT
on:
push:
tags:
- 'v*'
jobs:
build:
runs-on: windows-2025
permissions:
contents: write
steps:
- uses: actions/checkout@v6
- name: Setup MSBuild
uses: microsoft/setup-msbuild@v2
- name: Restore NuGet packages
run: nuget restore
- name: Build app
run: >
msbuild
optimizerNXT.slnx
/t:Build
/p:Configuration=Release
/p:Platform="Any CPU"
/p:Optimize=true
/p:Prefer32Bit=false
/p:DebugType=none
/m
- name: Create release description
run: |
$exePath = "./optimizerNXT/bin/Release/optimizerNXT.exe"
$bodyPath = "./release-body.md"
$changelogUrl = "https://github.com/hellzerg/optimizerNXT/blob/main/CHANGELOG.md"
$sha256 = Get-FileHash "$exePath" -Algorithm SHA256
$releaseBody = @"
SHA256: $($sha256.Hash)
[View changelog ➡]($changelogUrl)
"@
$releaseBody | Out-File -Encoding UTF8 $bodyPath
- name: Create release with tag
uses: ncipollo/release-action@v1
with:
tag: ${{ github.ref_name }}
name: ${{ github.ref_name }}
allowUpdates: true
replacesArtifacts: true
bodyFile: "./release-body.md"
artifacts: "./optimizerNXT/bin/Release/optimizerNXT.exe"