This repository was archived by the owner on Jan 4, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
67 lines (54 loc) · 1.91 KB
/
nightly.yml
File metadata and controls
67 lines (54 loc) · 1.91 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
# Builds a .NET framework project
name: Nightly builds
env:
projectName: FunkeySelectorGUI
projectFolder: FunkeySelector
solutionFile: FunkeySelector.sln
on:
workflow_dispatch:
push:
branches-ignore:
- "gh-pages"
pull_request:
branches-ignore:
- "gh-pages"
jobs:
build:
strategy:
matrix:
configuration: [ Debug, Release ]
runs-on: windows-2019
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup MSBuild
uses: microsoft/setup-msbuild@v2
- name: Setup NuGet
uses: NuGet/setup-nuget@v2
- name: Restore Packages
run: nuget restore ${{ env.solutionFile }}
- name: Get version from update.xml
id: getVersion
uses: mavrosxristoforos/get-xml-info@2.0
with:
xml-file: update.xml
xpath: //update/@version
- name: Normalize the version string into SemVer format (x.x.x)
id: normalizeVersion
run: |
$versionString = "${{ steps.getVersion.outputs.info }}"
$digits = $versionString.Split(".").Length
if ($digits -eq 1) { $versionString += ".0.0" }
elseif ($digits -eq 2) { $versionString += ".0" }
"VERSION=$($versionString)" | Out-File -FilePath $env:GITHUB_OUTPUT -Append
- name: Set version in AssemblyInfo.cs
uses: secondbounce/assemblyinfo-update@v2
with:
version: "${{ steps.normalizeVersion.outputs.VERSION }}"
- name: Build solution
run: msbuild ${{ env.solutionFile }} -t:rebuild -property:Configuration=${{ matrix.configuration }}
- name: Upload the build results as an artifact
uses: actions/upload-artifact@v4
with:
path: ${{ env.projectFolder }}/bin/${{ matrix.configuration }}/*
name: ${{ env.projectName }}.Nightly.${{ matrix.configuration }}