-
-
Notifications
You must be signed in to change notification settings - Fork 132
58 lines (48 loc) · 1.55 KB
/
compile.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
name: .NET
on:
push:
branches: [ master, development ]
paths-ignore:
- '*.md'
- 'docs/**'
pull_request:
branches: [ master, development ]
paths-ignore:
- '*.md'
- 'docs/**'
workflow_dispatch:
branches: [ master, development ]
paths-ignore:
- '*.md'
- 'docs/**'
jobs:
build:
runs-on: windows-latest
steps:
- name: checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Fetch all history for all tags and branches
run: |
git fetch --prune
- name: Setup MSBuild.exe
uses: microsoft/setup-msbuild@v2
- name: Cache Nuget
uses: actions/[email protected]
with:
path: ~/.nuget/packages
key: ${{ runner.os }}-nugetv1-${{ hashFiles('**/packages.lock.json') }}
restore-keys: |
${{ runner.os }}-nugetv1-
- name: Build
working-directory: src
run: |
dotnet restore --disable-parallel
# dotnet build --disable-parallel --configuration Release
# can't use pure dotnet build because gitversion issues
msbuild ${{ github.event.repository.name }}.csproj -verbosity:minimal /p:Configuration=Release /property:DisableGitVersionTask=true
# add check for PR against master from development -> build preRelease to nuget
# if merged into master -> build Release -> nuget
# if: github.ref == 'refs/heads/master' || (startsWith(github.ref, 'refs/tags/') && contains(github.ref,'-alpha'))
#/property:NugetAPIKey=${{ secrets.NugetAPIKey }}