Skip to content

Commit 25f9e14

Browse files
Vincent DüvelshöftVincent Düvelshöft
authored andcommitted
add gitversion
1 parent 7b0ed94 commit 25f9e14

2 files changed

Lines changed: 29 additions & 8 deletions

File tree

Lines changed: 26 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,27 +2,45 @@
22
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net
33

44
name: .NET
5+
permissions:
6+
contents: read
7+
pull-requests: write
58

69
on:
7-
push:
8-
branches: [ "master" ]
910
pull_request:
1011
branches: [ "master" ]
12+
push:
13+
branches: [ "master" ]
1114

1215
jobs:
13-
build:
14-
16+
build-and-test:
1517
runs-on: windows-latest
16-
1718
steps:
18-
- uses: actions/checkout@v4
19-
- name: Setup .NET
19+
- name: Checkout
20+
uses: actions/checkout@v4
21+
with:
22+
fetch-depth: 0
23+
24+
- name: Install GitVersion
25+
uses: gittools/actions/gitversion/setup@v3
26+
with:
27+
versionSpec: '6.x'
28+
29+
- name: Determine Version
30+
uses: gittools/actions/gitversion/execute@v3
31+
with:
32+
useConfigFile: true
33+
34+
- name: Install .NET SDK
2035
uses: actions/setup-dotnet@v4
2136
with:
2237
dotnet-version: 9.0.x
38+
2339
- name: Restore dependencies
2440
run: dotnet restore
41+
2542
- name: Build
26-
run: dotnet build --configuration Release --no-restore
43+
run: dotnet build --configuration Release --no-restore --property:Version=${{ env.semVer }}
44+
2745
- name: Test
2846
run: dotnet test --configuration Release --no-build --verbosity normal

GitVersion.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
branches:
2+
main:
3+
mode: ContinuousDeployment

0 commit comments

Comments
 (0)