-
-
Notifications
You must be signed in to change notification settings - Fork 64
61 lines (55 loc) · 2.06 KB
/
ci.yml
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
name: CI
on:
push:
branches:
- '**'
tags-ignore:
- v*
jobs:
nightly:
name: Nightly
runs-on: windows-latest
steps:
- uses: actions/[email protected]
with:
submodules: 'true'
fetch-depth: 0
- uses: microsoft/setup-msbuild@v2
- name: Ensure dotnet 3.1 is available
shell: powershell
run: |
choco install dotnetcore-3.1-runtime
# GitVersion action doesn't support /ensureassemblyinfo, see https://github.com/GitTools/actions/issues/220
# So we need to create a new file to let GitVersion populate it
- name: Create assembly info file for GitVersion
shell: powershell
run: |
set-Content -Path 'Blish HUD/Properties/AssemblyVersionInfo.cs' -Value 'using System.Reflection;'
- uses: gittools/actions/gitversion/[email protected]
with:
versionSpec: '5.x'
- uses: gittools/actions/gitversion/[email protected]
id: gitversion
with:
updateAssemblyInfo: true
updateAssemblyInfoFilename: Blish HUD/Properties/AssemblyVersionInfo.cs
- name: Run msbuild restore
run: msbuild -t:restore
- name: Run msbuild
run: msbuild -p:Configuration=Release -p:VERSIONED_BUILD=${{ steps.gitversion.outputs.semVer }}
- name: Delete documentation file before artifact
shell: powershell
run: |
remove-item "Blish HUD/bin/x64/Release/net472/Blish HUD.xml"
- name: Upload build artifact
uses: actions/upload-artifact@v4
with:
name: Blish HUD ${{ steps.gitversion.outputs.semVer }}
path: Blish HUD/bin/x64/Release/net472
- name: Run dotnet pack
run: dotnet pack "Blish HUD" -c Release -p:VERSIONED_BUILD=${{ steps.gitversion.outputs.semVer }}
- name: Upload NuGet package artifacts
uses: actions/upload-artifact@v4
with:
name: Blish HUD ${{ steps.gitversion.outputs.semVer }} NuGet packages
path: Blish HUD/bin/Release/BlishHUD.${{ steps.gitversion.outputs.semVer }}.*nupkg