-
Notifications
You must be signed in to change notification settings - Fork 16
70 lines (57 loc) · 1.74 KB
/
main.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
62
63
64
65
66
67
68
69
70
name: NET
on:
push:
branches:
- main
pull_request:
branches:
- main
env:
BuildConfig: Release
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
jobs:
build-win:
runs-on: windows-latest
steps:
- name: Cancel previous builds in PR
uses: styfle/[email protected]
- name: 'Checkout Code'
uses: actions/checkout@v4
with:
fetch-depth: 0 # avoid shallow clone so nbgv can do its work.
- name: 'Install .NET SDK'
uses: actions/setup-dotnet@v4
with:
global-json-file: ./global.json
- name: Versioning
uses: dotnet/nbgv@master
id: nbgv
- name: Version Info
run: |
echo 'SemVer2: ${{ steps.nbgv.outputs.SemVer2 }}'
- name: Build with dotnet
run: dotnet build
--configuration ${{ env.BuildConfig }}
/p:Version=${{ steps.nbgv.outputs.AssemblyVersion }}
- name: Test with dotnet
run: dotnet test
- name: Pack NuGet
run: dotnet pack
--configuration ${{ env.BuildConfig }}
/p:ContinuousIntegrationBuild=true
/p:Version=${{ steps.nbgv.outputs.NuGetPackageVersion }}
# - name: Update CHANGELOG
# id: changelog
# uses: requarks/changelog-action@v1
# with:
# token: ${{ github.token }}
# tag: ${{ github.ref_name }}
# - name: Create Release
# uses: ncipollo/[email protected]
# with:
# allowUpdates: true
# draft: false
# makeLatest: true
# name: ${{ github.ref_name }}
# body: ${{ steps.changelog.outputs.changes }}
# token: ${{ github.token }}